source: trunk/grails-app/domain/TaskModification.groovy @ 793

Last change on this file since 793 was 210, checked in by gav, 15 years ago

Make date calculations and formatting more groovy.

File size: 464 bytes
RevLine 
[93]1class TaskModification {
[66]2    Person person
[93]3    TaskModificationType taskModificationType
[66]4    Task task
5    Date date = new Date()
[180]6    String comment = ""
[66]7
[93]8    static belongsTo = [Person, TaskModificationType, Task]
[66]9
10    static constraints = {
11        person()
[93]12        taskModificationType()
[66]13        task()
14        date()
15        comment()
16    }
17
[180]18    String toString() {
[210]19        "${taskModificationType} on ${date.format('EEE, dd-MMM-yyyy')} by ${person}."
[180]20    }
[66]21}
Note: See TracBrowser for help on using the repository browser.