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

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

Add attentionFlag to Task domain along with views and logic to suite.
Add entry type 'cause', refactor as required.
Refactor task types.
Move createBreakin to createImmediateCallout.

File size: 1.5 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    boolean attentionFlag = false
22
23    static hasMany = [entries: Entry,
24                        taskModifications: TaskModification,
25                        assignedGroups: AssignedGroup,
26                        assignedPersons: AssignedPerson,
27                        subTasks: Task,
28                        associatedAssets: Asset,
29                        inventoryMovements: InventoryMovement]
30
31    static mappedBy = [taskRecurringSchedule:"task"]
32
33    static belongsTo = [TaskGroup, TaskStatus, Task, Person]
34
35    static constraints = {
36        description(blank:false,maxSize:75)
37        comment()
38        targetStartDate()
39        targetCompletionDate()
40        leadPerson()
41        taskPriority()
42        taskBudgetStatus()
43        taskStatus()
44        parentTask(nullable:true)
45        primaryAsset(nullable:true)
46        taskRecurringSchedule(nullable:true)
47        taskProcedure(nullable:true)
48
49    }
50
51    String toString() {"${this.id} - ${this.description}"}
52}
Note: See TracBrowser for help on using the repository browser.