source:
trunk/grails-app/domain/Section.groovy
@
601
Last change on this file since 601 was 456, checked in by , 15 years ago | |
---|---|
File size: 662 bytes |
Rev | Line | |
---|---|---|
[268] | 1 | class Section { |
[162] | 2 | |
[121] | 3 | Site site |
[162] | 4 | Department department |
[121] | 5 | |
[118] | 6 | String name |
7 | String description = "" | |
[331] | 8 | String comment = "" |
[118] | 9 | boolean isActive = true |
10 | ||
[268] | 11 | static hasMany = [assets: Asset, |
12 | maintenanceActions: MaintenanceAction, | |
13 | sectionExtendedAttributes: SectionExtendedAttribute] | |
[121] | 14 | |
15 | static belongsTo = [Site] | |
16 | ||
[268] | 17 | static constraints = { |
18 | name(maxSize:50, unique:true, blank:false) | |
[331] | 19 | description(maxSize:75) |
20 | comment(maxSize:500) | |
[268] | 21 | isActive() |
22 | } | |
[118] | 23 | |
[456] | 24 | static mapping = { |
25 | assets(batchSize:1000) | |
26 | } | |
27 | ||
[118] | 28 | String toString() { |
29 | "${this.name}" | |
30 | } | |
31 | } | |
32 |
Note: See TracBrowser
for help on using the repository browser.