Last change
on this file since 18 was
18,
checked in by tuxta, 16 years ago
|
Align domain classes to ERD.
|
File size:
574 bytes
|
Line | |
---|
1 | class 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() |
---|
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.