source:
trunk/grails-app/domain/Asset.groovy
@
281
| Last change on this file since 281 was 268, checked in by , 16 years ago | |
|---|---|
| File size: 566 bytes | |
| Rev | Line | |
|---|---|---|
| [116] | 1 | class Asset { |
| [122] | 2 | |
| [268] | 3 | Section section |
| [122] | 4 | |
| [116] | 5 | String name |
| 6 | String description = "" | |
| 7 | boolean isActive = true | |
| 8 | ||
| [268] | 9 | static hasMany = [assetSubItems: AssetSubItem, |
| 10 | maintenanceActions: MaintenanceAction, | |
| [131] | 11 | assetExtendedAttributes: AssetExtendedAttribute] |
| [121] | 12 | |
| [268] | 13 | static belongsTo = [Section] |
| [121] | 14 | |
| [124] | 15 | static constraints = { |
| [268] | 16 | name(maxSize:50, unique:true, blank:false) |
| 17 | description(maxSize:100) | |
| 18 | isActive() | |
| 19 | section() | |
| [124] | 20 | } |
| [116] | 21 | |
| 22 | String toString() { | |
| 23 | "${this.name}" | |
| 24 | } | |
| 25 | } | |
| 26 |
Note: See TracBrowser
for help on using the repository browser.
