-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.java
37 lines (32 loc) · 984 Bytes
/
task.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
@Entity
@SessionAttributes(value = {"episode", "user"})
public class Task {
public Task() {}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@CreationTimestamp
@DateTimeFormat(pattern = "dd/MM/yyyy")
@Temporal(TemporalType.DATE)
private Date createdDate;
@DateTimeFormat(pattern = "dd/MM/yyyy")
@Temporal(TemporalType.DATE)
private Date dueDate;
@DateTimeFormat(pattern = "dd/MM/yyyy")
@Temporal(TemporalType.DATE)
private Date completeDate;
@DateTimeFormat(pattern = "dd/MM/yyyy")
@Temporal(TemporalType.DATE)
private Date closedDate;
private String taskText;
@OneToMany(mappedBy = "task", orphanRemoval = true, cascade = CascadeType.ALL)
private Set<TaskNotes> notes;
@ManyToOne(optional = false)
@JoinColumn(name = "plan_id")
private Plan plan;
@ManyToOne
private User supervisor;
@ManyToOne
private User assignee;
// Getters & Setters
}