Ignore:
Timestamp:
Jan 14, 2010, 10:51:03 PM (14 years ago)
Author:
gav
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/AssetSubItem.groovy

    r267 r268  
    1 class AssetType {
     1class AssetSubItem {
     2
     3    Asset asset
     4    AssetSubItem parentItem
    25
    36    String name
    47    String description = ""
    5     String costCode = ""
    68    boolean isActive = true
    79
    8     static hasMany = [assets: Asset,
    9                                     assemblies: Assembly,
    10                                     maintenanceActions: MaintenanceAction]
     10    static hasMany = [subItems: AssetSubItem,
     11                                maintenanceActions: MaintenanceAction,
     12                                assetSubItemExtendedAttributes: AssetSubItemExtendedAttribute]
    1113
    12 //     static belongsTo = []
     14    static belongsTo = [Asset, AssetSubItem]
    1315
    14 //     static constraints = {
    15 //
    16 //     }
     16    static constraints = {
     17        name(maxSize:50, blank:false)
     18        description(maxSize:100)
     19        isActive()
     20        asset(nullable:true)
     21        parentItem(nullable:true)
     22    }
    1723
    1824    String toString() {
Note: See TracChangeset for help on using the changeset viewer.