Changeset 268 for trunk/grails-app/domain
- Timestamp:
- Jan 14, 2010, 10:51:03 PM (15 years ago)
- Location:
- trunk/grails-app/domain
- Files:
-
- 4 added
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/Asset.groovy
r180 r268 1 1 class Asset { 2 2 3 SystemSection systemSection 4 AssetType assetType 3 Section section 5 4 6 5 String name 7 6 String description = "" 8 String costCode = ""9 7 boolean isActive = true 10 8 11 static hasMany = [maintenanceActions: MaintenanceAction, 9 static hasMany = [assetSubItems: AssetSubItem, 10 maintenanceActions: MaintenanceAction, 12 11 assetExtendedAttributes: AssetExtendedAttribute] 13 12 14 static belongsTo = [S ystemSection, AssetType]13 static belongsTo = [Section] 15 14 16 15 static constraints = { 17 name(unique:true, blank:false) 16 name(maxSize:50, unique:true, blank:false) 17 description(maxSize:100) 18 isActive() 19 section() 18 20 } 19 21 -
trunk/grails-app/domain/AssetExtendedAttribute.groovy
r124 r268 1 1 class AssetExtendedAttribute { 2 2 3 ExtendedAttributeType extendedAttributeType 3 4 Asset asset 4 AssetExtendedAttributeType assetExtendedAttributeType5 5 6 6 String value … … 11 11 static belongsTo = [Asset] 12 12 13 // static constraints = { 14 // 15 // } 13 static constraints = { 14 value(maxSize:100) 15 isActive() 16 } 16 17 17 18 String toString() { 18 "${ assetExtendedAttributeType.name}: ${this.value}"19 "${extendedAttributeType.name}: ${this.value}" 19 20 } 20 21 } -
trunk/grails-app/domain/AssetSubItem.groovy
r267 r268 1 class AssetType { 1 class AssetSubItem { 2 3 Asset asset 4 AssetSubItem parentItem 2 5 3 6 String name 4 7 String description = "" 5 String costCode = ""6 8 boolean isActive = true 7 9 8 static hasMany = [ assets: Asset,9 assemblies: Assembly,10 maintenanceActions: MaintenanceAction]10 static hasMany = [subItems: AssetSubItem, 11 maintenanceActions: MaintenanceAction, 12 assetSubItemExtendedAttributes: AssetSubItemExtendedAttribute] 11 13 12 // static belongsTo = []14 static belongsTo = [Asset, AssetSubItem] 13 15 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 } 17 23 18 24 String toString() { -
trunk/grails-app/domain/Department.groovy
r164 r268 3 3 String name 4 4 String description = "" 5 String costCode = ""6 5 boolean isActive = true 7 6 8 static hasMany = [systemSections: SystemSection, persons: Person] 7 static hasMany = [sections: Section, 8 departmentExtendedAttributes: DepartmentExtendedAttribute, 9 persons: Person] 9 10 10 11 // static belongsTo = [] 11 12 12 13 static constraints = { 13 name() 14 description() 15 costCode() 14 name(maxSize:50, unique:true, blank:false) 15 description(maxSize:100) 16 16 isActive() 17 17 } -
trunk/grails-app/domain/ExtendedAttributeType.groovy
r267 r268 1 class AssetExtendedAttributeType {1 class ExtendedAttributeType { 2 2 3 3 String name … … 5 5 boolean isActive = true 6 6 7 static hasMany = [assetExtendedAttributes: AssetExtendedAttribute]7 // static hasMany = [] 8 8 9 9 // static belongsTo = [] 10 10 11 // static constraints = { 12 // 13 // } 11 static constraints = { 12 name(maxSize:50,unique:true,blank:false) 13 description(maxSize:100) 14 isActive() 15 } 14 16 15 17 String toString() { -
trunk/grails-app/domain/MaintenanceAction.groovy
r146 r268 3 3 TaskProcedure taskProcedure 4 4 MaintenancePolicy maintenancePolicy 5 S ystemSection systemSection5 Section section 6 6 Asset asset 7 AssetType assetType 8 Assembly assembly 9 SubAssembly subAssembly 10 ComponentItem componentItem 7 AssetSubItem assetSubItem 11 8 12 9 String description … … 20 17 21 18 static constraints = { 19 section(nullable:true) 20 asset(nullable:true) 21 assetSubItem(nullable:true) 22 22 maintenancePolicy(nullable:true) 23 systemSection(nullable:true)24 asset(nullable:true)25 assetType(nullable:true)26 assembly(nullable:true)27 subAssembly(nullable:true)28 componentItem(nullable:true)29 23 procedureStepNumber(nullable:true) 24 description() 25 reasoning() 26 isActive() 30 27 } 31 28 -
trunk/grails-app/domain/MaintenancePolicy.groovy
r122 r268 5 5 boolean isActive = true 6 6 7 static hasMany = [maintenanceActions: MaintenanceAction]7 // static hasMany = [maintenanceActions: MaintenanceAction] 8 8 9 9 // static belongsTo = [] 10 10 11 // static constraints = { 12 // } 11 static constraints = { 12 name(maxSize:50, unique:true, blank:false) 13 description(maxSize:100) 14 isActive() 15 } 13 16 14 17 String toString() { -
trunk/grails-app/domain/Section.groovy
r262 r268 1 class S ystemSection {1 class Section { 2 2 3 3 Site site … … 6 6 String name 7 7 String description = "" 8 String costCode = ""9 8 boolean isActive = true 10 9 11 static hasMany = [assets: Asset, maintenanceActions: MaintenanceAction] 10 static hasMany = [assets: Asset, 11 maintenanceActions: MaintenanceAction, 12 sectionExtendedAttributes: SectionExtendedAttribute] 12 13 13 14 static belongsTo = [Site] 14 15 15 // static constraints = { 16 // 17 // } 16 static constraints = { 17 name(maxSize:50, unique:true, blank:false) 18 description(maxSize:100) 19 isActive() 20 } 18 21 19 22 String toString() { -
trunk/grails-app/domain/Site.groovy
r163 r268 3 3 String name 4 4 String description = "" 5 String costCode = ""6 5 Boolean isActive = true 7 6 8 static hasMany = [inventoryStores: InventoryStore, systemSections: SystemSection] 7 // static hasMany = [inventoryStores: InventoryStore, systemSections: SystemSection] 8 static hasMany = [sections: Section, 9 siteExtendedAttributes: SiteExtendedAttribute] 9 10 10 11 // static belongsTo = [] 11 12 12 13 static constraints = { 13 name(maxSize:50, unique:true,blank:false)14 name(maxSize:50, unique:true, blank:false) 14 15 description(maxSize:100) 16 isActive() 15 17 } 16 18
Note: See TracChangeset
for help on using the changeset viewer.