Line | |
---|
1 | import java.text.SimpleDateFormat |
---|
2 | |
---|
3 | class TaskModification { |
---|
4 | Person person |
---|
5 | TaskModificationType taskModificationType |
---|
6 | Task task |
---|
7 | Date date = new Date() |
---|
8 | String comment = "" |
---|
9 | |
---|
10 | static belongsTo = [Person, TaskModificationType, Task] |
---|
11 | |
---|
12 | static constraints = { |
---|
13 | person() |
---|
14 | taskModificationType() |
---|
15 | task() |
---|
16 | date() |
---|
17 | comment() |
---|
18 | } |
---|
19 | |
---|
20 | String toString() { |
---|
21 | def date = new SimpleDateFormat("EEE, dd-MMM-yyyy").format(this.date) |
---|
22 | "${taskModificationType} on ${date} by ${person}." |
---|
23 | } |
---|
24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.