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

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

Created grails app and init domain classes

File size: 472 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
10    static belongsTo = Entry
11
12    static optionals = ["employeeID"]
13
14    static constraints = {
15        firstName()
16        lastName()
17        employeeID()
18    }
19
20    //Overriding the default toString method
21    String toString() {"${this.firstName}:"{this.lastName}}
22}
Note: See TracBrowser for help on using the repository browser.