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

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

Add support for taskModification audit/change log, the create and update modifications are complete.
Moved create and update of tasks to taskService.
Small Assset domain class adjustment to prevent blank asset name.
Removed "static scope = 'request'" from services since I don't believe it is required and it limits where the service may be used.

File size: 497 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 = {
[180]17        name(unique:true, blank:false)
[124]18    }
[116]19
20    String toString() {
21        "${this.name}"
22    }
23}
24
Note: See TracBrowser for help on using the repository browser.