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

Last change on this file since 19 was 19, checked in by tuxta, 15 years ago

Set up BootStrap? and tweaked Domain classes

File size: 600 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, tasks : Task,
10                        personGroups : PersonGroup]
11
12    static belongsTo = [PersonGroup]
13
14    static optionals = ["employeeID"]
15
16    static constraints = {
17        firstName()
18        lastName()
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.