source: branches/features/purchaseOrders/grails-app/domain/Picture.groovy @ 931

Last change on this file since 931 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: 731 bytes
Line 
1class Picture {
2
3    InventoryItem inventoryItem
4    SortedSet images
5    String file
6    Integer operation
7    String contentType
8    Integer width
9    Integer height
10    Date dateCreated = new Date()
11    Date lastUpdated = new Date()
12
13    static belongsTo = [ InventoryItem ]
14    static hasMany = [ images : Image ]
15
16    static transients = [ 'file', 'operation']
17
18    static constraints = {
19    }
20
21    static mapping = {
22        images cascade: 'all-delete-orphan', inverse: true
23    }
24
25    static final Integer NoOp = 0
26    static final Integer RotateClockWise90 = 1
27    static final Integer RotateAntiClockWise90 = 2
28    static final Integer Rotate180 = 3
29    static final Integer Flip = 4
30    static final Integer Flop = 5
31
32}
Note: See TracBrowser for help on using the repository browser.