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