Changeset 121


Ignore:
Timestamp:
Apr 30, 2009, 9:36:34 PM (13 years ago)
Author:
gav
Message:

Extensive update to Asset ERD and associated domain classes, not compiled or tested.

Location:
trunk
Files:
4 added
10 edited
1 moved

Legend:

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

    r118 r121  
    11class Assembly {
    2     LifePlan lifeplan
    32    String name
    43    String description = ""
    54    boolean isActive = true
    65
    7     static hasMany = [assetTypes: AssetType, subAssemblies: SubAssembly]
     6    static hasMany = [assetTypes: AssetType, subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
    87
    98    static belongsTo = [AssetType]
  • trunk/grails-app/domain/Asset.groovy

    r118 r121  
    11class Asset {
    2     LifePlan lifeplan
     2    SystemSection systemSection
    33    AssetType assetType
    44    String name
    55    String description = ""
    6     String locationLongText = ""
    7     Integer riskPriorityNumber
    8     String modelNumber = ""
    9     String serialNumber = ""
    10     Integer purchaseCost = 0
    11     Date manufacturedDate = new Date()
    12    
    136    boolean isActive = true
    147
    15 //     static hasMany = []
    16 //
    17 //     static belongsTo = []
    18 //
     8    static hasMany = [maintenanceActions: MaintenanceAction]
     9
     10    static belongsTo = [SystemSection]
     11
    1912//     static constraints = {
    2013//     }
  • trunk/grails-app/domain/AssetType.groovy

    r118 r121  
    11class AssetType {
    2     SystemSection systemSection
    3     LifePlan lifeplan
     2
    43    String name
    54    String description = ""
    65    boolean isActive = true
    76
    8     static hasMany = [assets: Asset, assemblies: Assembly]
    9 //
     7    static hasMany = [assets: Asset, assemblies: Assembly, assetExtendedAttributes: AssetExtendedAttribute, maintenanceActions: MaintenanceAction]
     8
    109//     static belongsTo = []
    11 //
     10
    1211//     static constraints = {
    1312//
  • trunk/grails-app/domain/ComponentItem.groovy

    r118 r121  
    11class ComponentItem {
    2     LifePlan lifeplan
    32    String name
    43    String description = ""
    5     Integer fmeaNumber
    64    boolean isActive = true
    75
    8     static hasMany = [subAssemblies: SubAssembly]
     6    static hasMany = [subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
    97
    108    static belongsTo = [SubAssembly]
  • trunk/grails-app/domain/LifePlan.groovy

    r118 r121  
    11class LifePlan {
    2     Asset asset
    3     Form form
    4     Frequency frequency
    5     AssetType assetType
    6     Assembly assembly
    7     SubAssembly subAssembly
    8     ComponentItem componentItem
    92
    103    String name
    114    String description = ""
    12     String resourceNumber = ""
    13     Integer timeInHours
    14     String maintenanceAction
    15     String notes = ""
    16    
    175    boolean isActive = true
    186
    19     static hasMany = [systemSections: SystemSection]
     7//     static hasMany = []
    208
    21     static belongsTo = [SystemSection]
     9//     static belongsTo = []
    2210
    23     static constraints = {
    24         asset(blank:true,nullable:true)
    25         form(blank:true,nullable:true)
    26         frequency(blank:true,nullable:true)
    27         assetType(blank:true,nullable:true)
    28         assembly(blank:true,nullable:true)
    29         subAssembly(blank:true,nullable:true)
    30         componentItem(blank:true,nullable:true)
    31     }
     11//     static constraints = {
     12//     }
    3213
    3314    String toString() {
  • trunk/grails-app/domain/MaintenanceAction.groovy

    r119 r121  
    1 class Form {
    2     String name
    3     String description = ""
     1class MaintenanceAction {
     2    MaintenancePolicy maintenancePolicy
     3    PlannedMaintenance plannedMaintenance
     4    SystemSection
     5    Asset asset
     6    AssetType assetType
     7    Assembly assembly
     8    SubAssembly subAssembly
     9    ComponentItem componentItem
     10    String description
     11    String reasoning = ""
    412    boolean isActive = true
    5     boolean isUsed = true
    613
    7     static hasMany = [lifePlans: LifePlan]
    8 //
    9 //     static belongsTo = []
    10 //
     14//     static hasMany = []
     15
     16    static belongsTo = [PlannedMaintenance]
     17
    1118//     static constraints = {
    1219//
     
    1421
    1522    String toString() {
    16         "${this.name}"
     23        "${this.description}"
    1724    }
    1825}
  • trunk/grails-app/domain/Site.groovy

    r116 r121  
    55    Boolean isActive = true
    66
    7     static hasMany = [inventoryStores: InventoryStore]
     7    static hasMany = [inventoryStores: InventoryStore, systemSections: SystemSection]
    88
    99//     static belongsTo = []
  • trunk/grails-app/domain/SubAssembly.groovy

    r118 r121  
    11class SubAssembly {
    2     LifePlan lifeplan
     2
    33    String name
    44    String description = ""
    55    boolean isActive = true
    66
    7     static hasMany = [assemblies: Assembly, componentItems: ComponentItem]
     7    static hasMany = [assemblies: Assembly, componentItems: ComponentItem, maintenanceActions: MaintenanceAction]
    88
    99    static belongsTo = [Assembly]
  • trunk/grails-app/domain/SystemSection.groovy

    r118 r121  
    11class SystemSection {
     2   
     3    Site site
     4
    25    String name
    36    String description = ""
    47    boolean isActive = true
    58
    6     static hasMany = [assetTypes: AssetType, lifePlans: LifePlan]
    7 //
    8 //     static belongsTo = []
    9 //
     9    static hasMany = [assets: Asset, maintenanceActions: MaintenanceAction]
     10
     11    static belongsTo = [Site]
     12
    1013//     static constraints = {
    1114//
  • trunk/grails-app/domain/Task.groovy

    r116 r121  
    11class Task {
     2
    23    TaskGroup taskGroup
    34    TaskStatus taskStatus
     
    78    Person leadPerson
    89    Asset primaryAsset
     10    RecurringSchedule recurringSchedule
     11
    912    String description
    1013    String comment = ""
Note: See TracChangeset for help on using the changeset viewer.