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

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