source: trunk/grails-app/domain/Task.groovy @ 121

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

Extensive update to Asset ERD and associated domain classes, not compiled or tested.

File size: 1.1 KB
Line 
1class Task {
2
3    TaskGroup taskGroup
4    TaskStatus taskStatus
5    TaskPriority taskPriority
6    TaskType taskType
7    Task    parentTask
8    Person leadPerson
9    Asset primaryAsset
10    RecurringSchedule recurringSchedule
11
12    String description
13    String comment = ""
14    Date targetStartDate = new Date()
15    Date targetCompletionDate = new Date()
16    boolean isScheduled = false
17    boolean isApproved = false
18    boolean isActive = true
19
20    static hasMany = [entries: Entry, 
21                        taskModifications: TaskModification, 
22                        assignedPersons: AssignedPerson, 
23                        subTasks: Task,
24                        associatedAssets: Asset,
25                        inventoryMovements: InventoryMovement]
26
27    static belongsTo = [TaskGroup, TaskStatus, Task, Person]
28
29    static constraints = {
30        targetStartDate()
31        description(blank:false,maxSize:75)
32        leadPerson()
33        taskPriority()
34        taskStatus()
35        parentTask(blank: true, nullable:true)
36        comment()
37        primaryAsset(blank: true, nullable:true)
38       
39    }
40
41    String toString() {"${this.description}"}
42}
Note: See TracBrowser for help on using the repository browser.