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

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

Added TaskBudgetStatus as per ticket #49.

File size: 1.4 KB
Line 
1class Task {
2
3    TaskGroup taskGroup
4    TaskStatus taskStatus
5    TaskPriority taskPriority
6    TaskBudgetStatus taskBudgetStatus
7    TaskType taskType
8    Task parentTask
9    Person leadPerson
10    Asset primaryAsset
11    TaskRecurringSchedule taskRecurringSchedule
12    TaskProcedure taskProcedure
13
14    String description
15    String comment = ""
16    Date targetStartDate = new Date()
17    Date targetCompletionDate = new Date()
18    boolean scheduled = false
19    boolean approved = false
20    boolean trash = false
21
22    static hasMany = [entries: Entry, 
23                        taskModifications: TaskModification,
24                        assignedGroups: AssignedGroup,
25                        assignedPersons: AssignedPerson,
26                        subTasks: Task,
27                        associatedAssets: Asset,
28                        inventoryMovements: InventoryMovement]
29
30    static mappedBy = [taskRecurringSchedule:"task"]
31
32    static belongsTo = [TaskGroup, TaskStatus, Task, Person]
33
34    static constraints = {
35        description(blank:false,maxSize:75)
36        comment()
37        targetStartDate()
38        targetCompletionDate()
39        leadPerson()
40        taskPriority()
41        taskBudgetStatus()
42        taskStatus()
43        parentTask(nullable:true)
44        primaryAsset(nullable:true)
45        taskRecurringSchedule(nullable:true)
46        taskProcedure(nullable:true)
47
48    }
49
50    String toString() {"${this.id} - ${this.description}"}
51}
Note: See TracBrowser for help on using the repository browser.