Last change
on this file since 277 was
276,
checked in by gav, 15 years ago
|
Change AssetSubItem to have many assets.
|
File size:
644 bytes
|
Rev | Line | |
---|
[268] | 1 | class AssetSubItem { |
---|
[121] | 2 | |
---|
[268] | 3 | AssetSubItem parentItem |
---|
| 4 | |
---|
[118] | 5 | String name |
---|
| 6 | String description = "" |
---|
| 7 | boolean isActive = true |
---|
| 8 | |
---|
[276] | 9 | static hasMany = [assets: Asset, |
---|
| 10 | subItems: AssetSubItem, |
---|
[268] | 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 | parentItem(nullable:true) |
---|
| 21 | } |
---|
[118] | 22 | |
---|
| 23 | String toString() { |
---|
| 24 | "${this.name}" |
---|
| 25 | } |
---|
| 26 | } |
---|
| 27 | |
---|
Note: See
TracBrowser
for help on using the repository browser.