source: trunk/grails-app/domain/InventoryItem.groovy @ 149

Last change on this file since 149 was 146, checked in by gav, 15 years ago

Remove invalid contraints reported by Tomcat debug logs.

File size: 1.3 KB
Line 
1class  InventoryItem {
2    InventoryGroup inventoryGroup
3    InventoryType inventoryType
4    UnitOfMeasure unitOfMeasure
5    String name
6    String description = ""
7    String manufacturersPartNumber
8    String suppliersPartNumber
9    Integer reorderPoint
10    Integer recommendedReorderPoint
11    Integer averageDeliveryTime
12    boolean isActive = true
13    boolean isObsolete = false
14    boolean enableReorder = true
15
16    static hasMany = [alternateItems: InventoryItem,
17                                    spareFor: Asset,
18                                    storedItems: StoredItem,
19                                    inventoryMovements: InventoryMovement,
20                                    manufacturers: Manufacturer,
21                                    suppliers: Supplier]
22
23//     static belongsTo = []
24
25    static constraints = {
26        name(unique:true, blank:false, maxSize:75)
27        description()
28        reorderPoint()
29        enableReorder()
30        isActive()
31        isObsolete()
32        inventoryGroup()
33        inventoryType()
34        unitOfMeasure()
35        manufacturersPartNumber(blank:true, nullable:true)
36        suppliersPartNumber(blank:true, nullable:true)
37        recommendedReorderPoint(nullable:true)
38        averageDeliveryTime(nullable:true)
39    }
40
41    String toString() {"${this.name}"}
42}
43       
Note: See TracBrowser for help on using the repository browser.