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
Line 
1class Asset {
2
3    SystemSection systemSection
4    AssetType assetType
5
6    String name
7    String description = ""
8    String costCode = ""
9    boolean isActive = true
10
11    static hasMany = [maintenanceActions: MaintenanceAction,
12                                    assetExtendedAttributes: AssetExtendedAttribute]
13
14    static belongsTo = [SystemSection, AssetType]
15
16    static constraints = {
17        name(unique:true, blank:false)
18    }
19
20    String toString() {
21        "${this.name}"
22    }
23}
24
Note: See TracBrowser for help on using the repository browser.