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

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

Domain change, remove scheduled attribute from Task.
Update views and logic to suite.

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