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

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

Refactor classes for asset tree refinement.
Regenerate views and controllers to suite.

File size: 642 bytes
Line 
1class AssetSubItem {
2
3    Asset asset
4    AssetSubItem parentItem
5
6    String name
7    String description = ""
8    boolean isActive = true
9
10    static hasMany = [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        asset(nullable:true)
21        parentItem(nullable:true)
22    }
23
24    String toString() {
25        "${this.name}"
26    }
27}
28
Note: See TracBrowser for help on using the repository browser.