source:
trunk/grails-app/domain/AssetSubItem.groovy
@
601
Last change on this file since 601 was 456, checked in by , 15 years ago | |
---|---|
File size: 772 bytes |
Rev | Line | |
---|---|---|
[268] | 1 | class AssetSubItem { |
[121] | 2 | |
[268] | 3 | AssetSubItem parentItem |
4 | ||
[118] | 5 | String name |
6 | String description = "" | |
[330] | 7 | String comment = "" |
[118] | 8 | boolean isActive = true |
9 | ||
[276] | 10 | static hasMany = [assets: Asset, |
11 | subItems: AssetSubItem, | |
[268] | 12 | maintenanceActions: MaintenanceAction, |
13 | assetSubItemExtendedAttributes: AssetSubItemExtendedAttribute] | |
[121] | 14 | |
[268] | 15 | static belongsTo = [Asset, AssetSubItem] |
[121] | 16 | |
[268] | 17 | static constraints = { |
[341] | 18 | name(maxSize:50, unique:true, blank:false) |
[330] | 19 | description(maxSize:75) |
20 | comment(maxSize:500) | |
[268] | 21 | isActive() |
22 | parentItem(nullable:true) | |
23 | } | |
[118] | 24 | |
[456] | 25 | static mapping = { |
26 | subItems(batchSize:1000) | |
27 | } | |
28 | ||
[118] | 29 | String toString() { |
30 | "${this.name}" | |
31 | } | |
32 | } | |
33 |
Note: See TracBrowser
for help on using the repository browser.