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

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