Ignore:
Timestamp:
Oct 23, 2009, 9:49:35 AM (15 years ago)
Author:
gav
Message:

Add Department-Person relationship, update demo data and views to suite.
Add department and personGroups to Person views.

Location:
trunk/grails-app/domain
Files:
2 edited

Legend:

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

    r162 r164  
    66    boolean isActive = true
    77
    8     static hasMany = [systemSections: SystemSection]
     8    static hasMany = [systemSections: SystemSection, persons: Person]
    99
    1010//     static belongsTo = []
    1111
    12 //     static constraints = {
    13 //
    14 //     }
     12    static constraints = {
     13        name()
     14        description()
     15        costCode()
     16        isActive()
     17    }
    1518
    1619    String toString() {
  • trunk/grails-app/domain/Person.groovy

    r154 r164  
    88
    99    static belongsTo = [Authority, PersonGroup]
     10
     11    Department department
    1012
    1113    String loginName
     
    3840        employeeID(blank: true, nullable:true)
    3941        description()
     42        department(nullable:true)
    4043        email()
    4144        emailShow()
Note: See TracChangeset for help on using the changeset viewer.