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

Last change on this file since 33 was 21, checked in by gavin, 16 years ago

Remove TypeOfClass? and change to ClassType?. Update ERD to match.
Create and add openMimLogo/Icon.
Generate-all *.
Configure BootStrap? and add entries, some not saving yet.
Update DatabaseDesign?.tex and index.gsp

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