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

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