source: trunk/grails-app/domain/AssetSubItem.groovy @ 281

Last change on this file since 281 was 276, checked in by gav, 15 years ago

Change AssetSubItem to have many assets.

File size: 644 bytes
Line 
1class AssetSubItem {
2
3    AssetSubItem parentItem
4
5    String name
6    String description = ""
7    boolean isActive = true
8
9    static hasMany = [assets: Asset,
10                                subItems: AssetSubItem,
11                                maintenanceActions: MaintenanceAction,
12                                assetSubItemExtendedAttributes: AssetSubItemExtendedAttribute]
13
14    static belongsTo = [Asset, AssetSubItem]
15
16    static constraints = {
17        name(maxSize:50, blank:false)
18        description(maxSize:100)
19        isActive()
20        parentItem(nullable:true)
21    }
22
23    String toString() {
24        "${this.name}"
25    }
26}
27
Note: See TracBrowser for help on using the repository browser.