source:
trunk/grails-app/domain/Asset.groovy
@
126
| Last change on this file since 126 was 124, checked in by , 17 years ago | |
|---|---|
| File size: 423 bytes | |
| Rev | Line | |
|---|---|---|
| [116] | 1 | class Asset { |
| [122] | 2 | |
| [121] | 3 | SystemSection systemSection |
| [118] | 4 | AssetType assetType |
| [122] | 5 | |
| [116] | 6 | String name |
| 7 | String description = "" | |
| 8 | boolean isActive = true | |
| 9 | ||
| [124] | 10 | static hasMany = [maintenanceActions: MaintenanceAction, assetExtendedAttributes: AssetExtendedAttribute] |
| [121] | 11 | |
| [122] | 12 | static belongsTo = [SystemSection, AssetType] |
| [121] | 13 | |
| [124] | 14 | static constraints = { |
| 15 | name(unique:true) | |
| 16 | } | |
| [116] | 17 | |
| 18 | String toString() { | |
| 19 | "${this.name}" | |
| 20 | } | |
| 21 | } | |
| 22 |
Note: See TracBrowser
for help on using the repository browser.
