source:
trunk/grails-app/domain/Site.groovy
@
734
Last change on this file since 734 was 456, checked in by , 15 years ago | |
---|---|
File size: 713 bytes |
Rev | Line | |
---|---|---|
[116] | 1 | class Site { |
2 | ||
3 | String name | |
4 | String description = "" | |
[332] | 5 | String comment = "" |
[116] | 6 | Boolean isActive = true |
7 | ||
[268] | 8 | static hasMany = [sections: Section, |
[273] | 9 | siteExtendedAttributes: SiteExtendedAttribute, |
[397] | 10 | inventoryStores: InventoryStore, |
[402] | 11 | contacts: Contact, |
[397] | 12 | addresses: Address] |
[116] | 13 | |
14 | // static belongsTo = [] | |
15 | ||
16 | static constraints = { | |
[268] | 17 | name(maxSize:50, unique:true, blank:false) |
[332] | 18 | description(maxSize:75) |
19 | comment(maxSize:500) | |
[268] | 20 | isActive() |
[116] | 21 | } |
22 | ||
[456] | 23 | static mapping = { |
24 | sections(batchSize:1000) | |
25 | } | |
26 | ||
[116] | 27 | String toString() { |
28 | "${this.name}" | |
29 | } | |
30 | } |
Note: See TracBrowser
for help on using the repository browser.