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

Last change on this file since 40 was 40, checked in by gav, 16 years ago

Added login page and adjusted Person domain/views/controller and BootStrap?.
Add beforeInterceptor() to all controllers.
Added BaseController?.
Added adminmenubar adjust layout and css to suite.

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