source: trunk/grails-app/domain/Contact.groovy @ 421

Last change on this file since 421 was 402, checked in by gav, 15 years ago

Add contacts to Person, Supplier, Manufacturer and Site.

File size: 497 bytes
RevLine 
[402]1class Contact {
2
3    ContactType contactType
4
5    Manufacturer manufacturer
6    Supplier supplier
7    Person person
8    Site site
9
10    String value
11
12//     hasMany = []
13
14    static belongsTo = [Manufacturer, Supplier, Person, Site]
15
16    static constraints = {
17        value(maxSize:50)
18
19        manufacturer(nullable:true)
20        supplier(nullable:true)
21        person(nullable:true)
22        site(nullable:true)
23    }
24
25    String toString() {
26        "${this.contactType}: ${this.value}"
27    }
28
29}
Note: See TracBrowser for help on using the repository browser.