[66] | 1 | class Task { |
---|
[121] | 2 | |
---|
[66] | 3 | TaskGroup taskGroup |
---|
| 4 | TaskStatus taskStatus |
---|
[69] | 5 | TaskPriority taskPriority |
---|
[252] | 6 | TaskBudgetStatus taskBudgetStatus |
---|
[69] | 7 | TaskType taskType |
---|
[168] | 8 | Task parentTask |
---|
[66] | 9 | Person leadPerson |
---|
[472] | 10 | Site site |
---|
| 11 | Section section |
---|
[116] | 12 | Asset primaryAsset |
---|
[472] | 13 | AssetSubItem assetSubItem |
---|
[131] | 14 | TaskRecurringSchedule taskRecurringSchedule |
---|
| 15 | TaskProcedure taskProcedure |
---|
[121] | 16 | |
---|
[66] | 17 | String description |
---|
| 18 | String comment = "" |
---|
| 19 | Date targetStartDate = new Date() |
---|
| 20 | Date targetCompletionDate = new Date() |
---|
[181] | 21 | boolean approved = false |
---|
| 22 | boolean trash = false |
---|
[418] | 23 | boolean attentionFlag = false |
---|
[592] | 24 | boolean safetyRequirement = false |
---|
| 25 | boolean mandatoryRegulatory = false |
---|
| 26 | boolean positiveFault = false |
---|
[66] | 27 | |
---|
[418] | 28 | static hasMany = [entries: Entry, |
---|
[147] | 29 | taskModifications: TaskModification, |
---|
[242] | 30 | assignedGroups: AssignedGroup, |
---|
[241] | 31 | assignedPersons: AssignedPerson, |
---|
[116] | 32 | subTasks: Task, |
---|
| 33 | associatedAssets: Asset, |
---|
| 34 | inventoryMovements: InventoryMovement] |
---|
[66] | 35 | |
---|
[131] | 36 | static mappedBy = [taskRecurringSchedule:"task"] |
---|
| 37 | |
---|
[69] | 38 | static belongsTo = [TaskGroup, TaskStatus, Task, Person] |
---|
[66] | 39 | |
---|
| 40 | static constraints = { |
---|
[131] | 41 | description(blank:false,maxSize:75) |
---|
[446] | 42 | comment(maxSize:1000) |
---|
[66] | 43 | targetStartDate() |
---|
[446] | 44 | targetCompletionDate(validator: {val, obj -> |
---|
| 45 | if(val.before(obj.targetStartDate)) |
---|
| 46 | return 'before.targetStartDate' |
---|
| 47 | }) |
---|
[66] | 48 | leadPerson() |
---|
[69] | 49 | taskPriority() |
---|
[252] | 50 | taskBudgetStatus() |
---|
[66] | 51 | taskStatus() |
---|
[146] | 52 | parentTask(nullable:true) |
---|
[472] | 53 | site(nullable:true) |
---|
| 54 | section(nullable:true) |
---|
[146] | 55 | primaryAsset(nullable:true) |
---|
[472] | 56 | assetSubItem(nullable:true) |
---|
[146] | 57 | taskRecurringSchedule(nullable:true) |
---|
| 58 | taskProcedure(nullable:true) |
---|
| 59 | |
---|
[66] | 60 | } |
---|
| 61 | |
---|
[123] | 62 | String toString() {"${this.id} - ${this.description}"} |
---|
[66] | 63 | } |
---|