Changeset 175 for trunk/grails-app/domain
- Timestamp:
- Oct 29, 2009, 8:30:58 PM (15 years ago)
- Location:
- trunk/grails-app/domain
- Files:
-
- 1 deleted
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/InventoryItem.groovy
r146 r175 3 3 InventoryType inventoryType 4 4 UnitOfMeasure unitOfMeasure 5 InventoryLocation inventoryLocation 6 Period averageDeliveryPeriod 5 7 String name 6 8 String description = "" 7 9 String manufacturersPartNumber 8 10 String suppliersPartNumber 11 Integer unitsInStock = 0 9 12 Integer reorderPoint 10 13 Integer recommendedReorderPoint … … 16 19 static hasMany = [alternateItems: InventoryItem, 17 20 spareFor: Asset, 18 storedItems: StoredItem,19 21 inventoryMovements: InventoryMovement, 20 22 manufacturers: Manufacturer, … … 24 26 25 27 static constraints = { 26 name(unique:true, blank:false, maxSize: 75)28 name(unique:true, blank:false, maxSize:50) 27 29 description() 30 unitsInStock(min:0) 31 unitOfMeasure() 28 32 reorderPoint() 29 33 enableReorder() 34 recommendedReorderPoint(nullable:true) 30 35 isActive() 31 36 isObsolete() 32 37 inventoryGroup() 33 38 inventoryType() 34 unitOfMeasure()35 39 manufacturersPartNumber(blank:true, nullable:true) 36 40 suppliersPartNumber(blank:true, nullable:true) 37 recommendedReorderPoint(nullable:true)38 41 averageDeliveryTime(nullable:true) 42 averageDeliveryPeriod(nullable:true) 39 43 } 40 44 -
trunk/grails-app/domain/InventoryLocation.groovy
r162 r175 1 class StoreLocation {1 class InventoryLocation { 2 2 3 3 InventoryStore inventoryStore 4 String bin4 String name 5 5 Boolean isActive = true 6 6 7 static hasMany = [ storedItems: StoredItem]7 static hasMany = [inventoryItems: InventoryItem] 8 8 9 static belongsTo = [InventoryStore]9 // static belongsTo = [InventoryStore] 10 10 11 11 static constraints = { 12 bin(maxSize:50)12 name(maxSize:50) 13 13 } 14 14 15 15 String toString() { 16 "${this. bin}"16 "${this.name}" 17 17 } 18 18 } -
trunk/grails-app/domain/InventoryMovement.groovy
r146 r175 1 import java.text.SimpleDateFormat 2 1 3 class InventoryMovement { 2 4 InventoryItem inventoryItem 3 5 InventoryMovementType inventoryMovementType 4 6 Task task 5 Stringquantity7 Integer quantity 6 8 Date date = new Date() 7 9 8 static belongsTo = [InventoryItem]10 // static belongsTo = [inventoryItem] 9 11 10 12 static constraints = { 11 13 inventoryItem() 12 quantity( )14 quantity(min:1) 13 15 inventoryMovementType() 14 16 task(nullable:true) … … 16 18 } 17 19 18 String toString() {"${this.quantity}"} 20 String toString() { 21 def date = new SimpleDateFormat("EEE, dd-MMM-yyyy").format(this.date) 22 "${this.quantity} ${inventoryMovementType.name} on ${date}" 23 } 19 24 } -
trunk/grails-app/domain/InventoryStore.groovy
r116 r175 6 6 Boolean isActive = true 7 7 8 static hasMany = [ storeLocations: StoreLocation]8 static hasMany = [inventoryLocations: InventoryLocation] 9 9 10 10 static belongsTo = [Site]
Note: See TracChangeset
for help on using the changeset viewer.