Last change
on this file since 287 was
268,
checked in by gav, 15 years ago
|
Refactor classes for asset tree refinement.
Regenerate views and controllers to suite.
|
File size:
549 bytes
|
Rev | Line | |
---|
[268] | 1 | class Section { |
---|
[162] | 2 | |
---|
[121] | 3 | Site site |
---|
[162] | 4 | Department department |
---|
[121] | 5 | |
---|
[118] | 6 | String name |
---|
| 7 | String description = "" |
---|
| 8 | boolean isActive = true |
---|
| 9 | |
---|
[268] | 10 | static hasMany = [assets: Asset, |
---|
| 11 | maintenanceActions: MaintenanceAction, |
---|
| 12 | sectionExtendedAttributes: SectionExtendedAttribute] |
---|
[121] | 13 | |
---|
| 14 | static belongsTo = [Site] |
---|
| 15 | |
---|
[268] | 16 | static constraints = { |
---|
| 17 | name(maxSize:50, unique:true, blank:false) |
---|
| 18 | description(maxSize:100) |
---|
| 19 | isActive() |
---|
| 20 | } |
---|
[118] | 21 | |
---|
| 22 | String toString() { |
---|
| 23 | "${this.name}" |
---|
| 24 | } |
---|
| 25 | } |
---|
| 26 | |
---|
Note: See
TracBrowser
for help on using the repository browser.