source: trunk/grails-app/domain/Asset.groovy @ 279

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

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

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