-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestODM.java
89 lines (80 loc) · 2.81 KB
/
TestODM.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package Samples.Models.Primary;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class TestODM extends TestModel {
public String name;
public String email;
public int users_id_fk;
public String rol;
public String create_at;
public String update_at;
public TestODM() { }
public TestODM(String name, String email, int users_id_fk, String rol) {
super(name, email, users_id_fk, rol);
this.name = name;
this.email = email;
this.users_id_fk = users_id_fk;
this.rol = rol;
}
public TestODM(String name, String email, int users_id_fk, String rol, String create_at) {
super(name, email, users_id_fk, rol, create_at);
this.name = name;
this.email = email;
this.users_id_fk = users_id_fk;
this.rol = rol;
this.create_at = create_at;
}
public TestODM(String name, String email, int users_id_fk, String rol, String create_at, String update_at) {
super(name, email, users_id_fk, rol, create_at, update_at);
this.name = name;
this.email = email;
this.users_id_fk = users_id_fk;
this.rol = rol;
this.create_at = create_at;
this.update_at = update_at;
}
// get
public String getName() {
return name;
}
public String getEmail() {
return email;
}
public String getRol() {
return rol;
}
public String getCreate_at() {
String date = null;
if(create_at != null) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime miDate = LocalDateTime.parse(create_at, dtf);
date = dtf.format(miDate).toString();
}
return date;
}
public String getUpdate_at() {
String date = null;
if(update_at != null) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime miDate = LocalDateTime.parse(update_at, dtf);
date = dtf.format(miDate).toString();
}
return date;
}
public void setUpdate_at(String update_at) {
this.update_at = update_at;
}
public void setCreate_at(String create_at) {
this.create_at = create_at;
}
public void createUpdate_at() {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime miDate = LocalDateTime.now();
create_at = dtf.format(miDate).toString();
}
public void createCreate_at() {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime miDate = LocalDateTime.now();
create_at = dtf.format(miDate).toString();
}
}