Last change
on this file since 299 was
182,
checked in by gav, 15 years ago
|
Add support for inventory item Pictures and Images.
Add new PersonService, refactor CreateDataService and TaskService to suite.
|
File size:
1.6 KB
|
Rev | Line | |
---|
[116] | 1 | class InventoryItem { |
---|
| 2 | InventoryGroup inventoryGroup |
---|
| 3 | InventoryType inventoryType |
---|
| 4 | UnitOfMeasure unitOfMeasure |
---|
[175] | 5 | InventoryLocation inventoryLocation |
---|
| 6 | Period averageDeliveryPeriod |
---|
[182] | 7 | Picture picture |
---|
[116] | 8 | String name |
---|
| 9 | String description = "" |
---|
| 10 | String manufacturersPartNumber |
---|
| 11 | String suppliersPartNumber |
---|
[175] | 12 | Integer unitsInStock = 0 |
---|
[116] | 13 | Integer reorderPoint |
---|
| 14 | Integer recommendedReorderPoint |
---|
| 15 | Integer averageDeliveryTime |
---|
| 16 | boolean isActive = true |
---|
| 17 | boolean isObsolete = false |
---|
| 18 | boolean enableReorder = true |
---|
| 19 | |
---|
[182] | 20 | static mapping = { |
---|
| 21 | picture cascade: 'all-delete-orphan', lazy: true, inverse: true |
---|
| 22 | } |
---|
| 23 | |
---|
[116] | 24 | static hasMany = [alternateItems: InventoryItem, |
---|
| 25 | spareFor: Asset, |
---|
| 26 | inventoryMovements: InventoryMovement, |
---|
| 27 | manufacturers: Manufacturer, |
---|
| 28 | suppliers: Supplier] |
---|
| 29 | |
---|
| 30 | // static belongsTo = [] |
---|
| 31 | |
---|
| 32 | static constraints = { |
---|
[182] | 33 | picture(nullable:true) |
---|
[175] | 34 | name(unique:true, blank:false, maxSize:50) |
---|
[116] | 35 | description() |
---|
[175] | 36 | unitsInStock(min:0) |
---|
| 37 | unitOfMeasure() |
---|
[116] | 38 | reorderPoint() |
---|
| 39 | enableReorder() |
---|
[175] | 40 | recommendedReorderPoint(nullable:true) |
---|
[116] | 41 | isActive() |
---|
| 42 | isObsolete() |
---|
| 43 | inventoryGroup() |
---|
| 44 | inventoryType() |
---|
| 45 | manufacturersPartNumber(blank:true, nullable:true) |
---|
| 46 | suppliersPartNumber(blank:true, nullable:true) |
---|
[146] | 47 | averageDeliveryTime(nullable:true) |
---|
[175] | 48 | averageDeliveryPeriod(nullable:true) |
---|
[116] | 49 | } |
---|
| 50 | |
---|
| 51 | String toString() {"${this.name}"} |
---|
| 52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.