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

Last change on this file since 472 was 472, checked in by gav, 14 years ago

Change Task domain class to have site, section and assetSubItem.

File size: 1.7 KB
RevLine 
[66]1class 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 scheduled = false
22    boolean approved = false
23    boolean trash = false
[418]24    boolean attentionFlag = false
[66]25
[418]26    static hasMany = [entries: Entry,
[147]27                        taskModifications: TaskModification,
[242]28                        assignedGroups: AssignedGroup,
[241]29                        assignedPersons: AssignedPerson,
[116]30                        subTasks: Task,
31                        associatedAssets: Asset,
32                        inventoryMovements: InventoryMovement]
[66]33
[131]34    static mappedBy = [taskRecurringSchedule:"task"]
35
[69]36    static belongsTo = [TaskGroup, TaskStatus, Task, Person]
[66]37
38    static constraints = {
[131]39        description(blank:false,maxSize:75)
[446]40        comment(maxSize:1000)
[66]41        targetStartDate()
[446]42        targetCompletionDate(validator: {val, obj ->
43            if(val.before(obj.targetStartDate))
44                return 'before.targetStartDate'
45        })
[66]46        leadPerson()
[69]47        taskPriority()
[252]48        taskBudgetStatus()
[66]49        taskStatus()
[146]50        parentTask(nullable:true)
[472]51        site(nullable:true)
52        section(nullable:true)
[146]53        primaryAsset(nullable:true)
[472]54        assetSubItem(nullable:true)
[146]55        taskRecurringSchedule(nullable:true)
56        taskProcedure(nullable:true)
57
[66]58    }
59
[123]60    String toString() {"${this.id} - ${this.description}"}
[66]61}
Note: See TracBrowser for help on using the repository browser.