Changeset 18 for trunk/src/grails-app


Ignore:
Timestamp:
Nov 25, 2008, 1:22:58 PM (15 years ago)
Author:
tuxta
Message:

Align domain classes to ERD.

Location:
trunk/src/grails-app/domain
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/grails-app/domain/Entry.groovy

    r16 r18  
    66    String comments
    77
    8     static hasMany = [people: Person]
     8    static hasMany = [persons: Person]
     9
     10    static belongsTo = [TypeOfEntry, Task, Person]
    911
    1012    static constraints = {
  • trunk/src/grails-app/domain/Modification.groovy

    r16 r18  
    1515        comments()
    1616    }
     17
     18    static optionals = ["comments"]
    1719}
  • trunk/src/grails-app/domain/Person.groovy

    r16 r18  
    11class Person {
     2    PersonGroup personGroup
    23    String firstName
    34    String lastName
     
    67
    78    static hasMany = [modifications : Modification,
    8                         entries : Entry]
     9                        entries : Entry, tasks : Task,
     10                        personGroups : PersonGroup]
    911
    10     static belongsTo = Entry
     12    static belongsTo = [PersonGroup]
    1113
    1214    static optionals = ["employeeID"]
  • trunk/src/grails-app/domain/Task.groovy

    r16 r18  
    11class Task {
    22    TaskGroup taskGroup
     3    Person person
    34    String name
    45    String description
     6    Date scheduledDate
     7    Date targetDate
    58
    6     static hasMany = [entries : Entry, modifications : Modification]
     9    static hasMany = [entries: Entry, modifications : Modification]
    710
    8     static belongsTo = TaskGroup
     11    static belongsTo = [TaskGroup, Person]
    912
    1013    static constraints = {
  • trunk/src/grails-app/domain/TaskGroup.groovy

    r16 r18  
    22    String name
    33    String description
     4    boolean isActive
    45
    56    static hasMany = [tasks : Task]
  • trunk/src/grails-app/domain/TypeOfModification.groovy

    r16 r18  
    66    static hasMany = [modifications : Modification]
    77
     8    static constraints = {
     9        name()
     10        description()
     11        isActive()
     12    }
    813}
Note: See TracChangeset for help on using the changeset viewer.