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

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

Add costCode attribute to Asset and regen non-detailed controller and views, adjust detailed views to suite.

File size: 484 bytes
RevLine 
[116]1class Asset {
[122]2
[121]3    SystemSection systemSection
[118]4    AssetType assetType
[122]5
[116]6    String name
7    String description = ""
[161]8    String costCode = ""
[116]9    boolean isActive = true
10
[161]11    static hasMany = [maintenanceActions: MaintenanceAction,
[131]12                                    assetExtendedAttributes: AssetExtendedAttribute]
[121]13
[122]14    static belongsTo = [SystemSection, AssetType]
[121]15
[124]16    static constraints = {
17        name(unique:true)
18    }
[116]19
20    String toString() {
21        "${this.name}"
22    }
23}
24
Note: See TracBrowser for help on using the repository browser.