source: trunk/src/grails-app/domain/Person.groovy @ 36

Last change on this file since 36 was 35, checked in by gav, 16 years ago

Adjusted constraints and regen-all for Person/Group/Type? and Task/Group?.

File size: 640 bytes
RevLine 
[16]1class Person {
2    String firstName
3    String lastName
4    Integer employeeID
5    boolean isActive = true
6
7    static hasMany = [modifications : Modification,
[21]8                        entries : Entry,
9                        tasks : Task,
[18]10                        personGroups : PersonGroup]
[16]11
[18]12    static belongsTo = [PersonGroup]
[16]13
14    static optionals = ["employeeID"]
15
16    static constraints = {
[35]17        firstName(maxSize:50,blank:false)
18        lastName(maxSize:50,blank:false)
[19]19        employeeID(blank:true, nullable:true)
[16]20    }
21
22    //Overriding the default toString method
[19]23    String toString() {"${this.firstName} ${this.lastName}"}
[16]24}
Note: See TracBrowser for help on using the repository browser.