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

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

Extensive update to Asset ERD and associated domain classes, not compiled or tested.

File size: 1.1 KB
RevLine 
[66]1class Task {
[121]2
[66]3    TaskGroup taskGroup
4    TaskStatus taskStatus
[69]5    TaskPriority taskPriority
6    TaskType taskType
7    Task    parentTask
[66]8    Person leadPerson
[116]9    Asset primaryAsset
[121]10    RecurringSchedule recurringSchedule
11
[66]12    String description
13    String comment = ""
14    Date targetStartDate = new Date()
15    Date targetCompletionDate = new Date()
16    boolean isScheduled = false
17    boolean isApproved = false
18    boolean isActive = true
19
[69]20    static hasMany = [entries: Entry, 
[93]21                        taskModifications: TaskModification, 
[96]22                        assignedPersons: AssignedPerson, 
[116]23                        subTasks: Task,
24                        associatedAssets: Asset,
25                        inventoryMovements: InventoryMovement]
[66]26
[69]27    static belongsTo = [TaskGroup, TaskStatus, Task, Person]
[66]28
29    static constraints = {
30        targetStartDate()
[91]31        description(blank:false,maxSize:75)
[66]32        leadPerson()
[69]33        taskPriority()
[66]34        taskStatus()
[69]35        parentTask(blank: true, nullable:true)
[106]36        comment()
[116]37        primaryAsset(blank: true, nullable:true)
[69]38       
[66]39    }
40
41    String toString() {"${this.description}"}
42}
Note: See TracBrowser for help on using the repository browser.