Ignore:
Timestamp:
May 8, 2009, 1:01:56 AM (16 years ago)
Author:
gav
Message:

Reconfigure Planned Maintenance again, now Preventative Maintenance, TaskProcedure? and MaintenanceAction?

Location:
trunk/grails-app/domain
Files:
1 added
6 edited
2 moved

Legend:

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

    r121 r131  
    11class Assembly {
     2
     3    AssetType assetType
     4
    25    String name
    36    String description = ""
    47    boolean isActive = true
    58
    6     static hasMany = [assetTypes: AssetType, subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
     9    static hasMany = [subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
    710
    811    static belongsTo = [AssetType]
  • trunk/grails-app/domain/Asset.groovy

    r124 r131  
    88    boolean isActive = true
    99
    10     static hasMany = [maintenanceActions: MaintenanceAction, assetExtendedAttributes: AssetExtendedAttribute]
     10    static hasMany = [maintenanceActions: MaintenanceAction,
     11                                    assetExtendedAttributes: AssetExtendedAttribute]
    1112
    1213    static belongsTo = [SystemSection, AssetType]
  • trunk/grails-app/domain/ComponentItem.groovy

    r122 r131  
    11class ComponentItem {
     2
     3    SubAssembly subAssembly
    24
    35    String name
     
    57    boolean isActive = true
    68
    7     static hasMany = [subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
     9    static hasMany = [maintenanceActions: MaintenanceAction]
    810
    911    static belongsTo = [SubAssembly]
  • trunk/grails-app/domain/MaintenanceAction.groovy

    r130 r131  
    1 class TaskAction {
    2     Task task
     1class MaintenanceAction {
     2
     3    TaskProcedure taskProcedure
    34    MaintenancePolicy maintenancePolicy
    45    SystemSection systemSection
     
    89    SubAssembly subAssembly
    910    ComponentItem componentItem
    10     String action
     11
     12    String description
    1113    String reasoning = ""
    12     Integer stepNumber
     14    Integer procedureStepNumber
    1315    boolean isActive = true
    1416
     
    1820
    1921    static constraints = {
     22        maintenancePolicy(blank:true, nullable:true)
    2023        systemSection(blank:true, nullable:true)
    2124        asset(blank:true, nullable:true)
     
    2427        subAssembly(blank:true, nullable:true)
    2528        componentItem(blank:true, nullable:true)
    26         stepNumber(blank:true, nullable:true)
     29        procedureStepNumber(blank:true, nullable:true)
    2730    }
    2831
    2932    String toString() {
    30         "${this.action}"
     33        "${this.description}"
    3134    }
    3235}
  • trunk/grails-app/domain/Period.groovy

    r122 r131  
    11class Period {
     2
    23    String period
    34    boolean isActive = true
    45
    5     static hasMany = [recurringSchedules: RecurringSchedule]
     6    static hasMany = [taskRecurringSchedules: TaskRecurringSchedule]
    67//
    78//     static belongsTo = []
  • trunk/grails-app/domain/SubAssembly.groovy

    r121 r131  
    11class SubAssembly {
     2
     3    Assembly assembly
    24
    35    String name
     
    57    boolean isActive = true
    68
    7     static hasMany = [assemblies: Assembly, componentItems: ComponentItem, maintenanceActions: MaintenanceAction]
     9    static hasMany = [componentItems: ComponentItem,
     10                                    maintenanceActions: MaintenanceAction]
    811
    912    static belongsTo = [Assembly]
  • trunk/grails-app/domain/Task.groovy

    r123 r131  
    88    Person leadPerson
    99    Asset primaryAsset
    10     RecurringSchedule recurringSchedule
     10    TaskRecurringSchedule taskRecurringSchedule
     11    TaskProcedure taskProcedure
    1112
    1213    String description
     
    2526                        inventoryMovements: InventoryMovement]
    2627
     28    static mappedBy = [taskRecurringSchedule:"task"]
     29
    2730    static belongsTo = [TaskGroup, TaskStatus, Task, Person]
    2831
    2932    static constraints = {
     33        description(blank:false,maxSize:75)
     34        comment()
    3035        targetStartDate()
    31         description(blank:false,maxSize:75)
     36        targetCompletionDate()
    3237        leadPerson()
    3338        taskPriority()
    3439        taskStatus()
    3540        parentTask(blank: true, nullable:true)
    36         comment()
    3741        primaryAsset(blank: true, nullable:true)
    38         recurringSchedule(blank: true, nullable:true)
     42        taskRecurringSchedule(blank: true, nullable:true)
     43        taskProcedure(blank: true, nullable:true)
    3944       
    4045    }
  • trunk/grails-app/domain/TaskRecurringSchedule.groovy

    r130 r131  
    22
    33    Task task
    4 //     Task lastGeneratedSubTask
     4    Task lastGeneratedSubTask
    55    Period period
    66
     
    99    Date lastGeneratedDate
    1010    Date nextDueDate
    11     boolean isActive = true
     11    boolean isEnabled = true
    1212
    1313//     static hasMany = []
     
    1616
    1717    static constraints = {
    18 //         lastGeneratedDate(blank:true, nullable:true)
     18        lastGeneratedDate(blank:true, nullable:true)
     19        lastGeneratedSubTask(blank:true, nullable:true)
    1920    }
    2021
Note: See TracChangeset for help on using the changeset viewer.