All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.causecode.contact.Contact.groovy Maven / Gradle / Ivy

Go to download

nucleus is a Grails-Groovy plugin which contains utility methods, classes and endpoints.

There is a newer version: 1.1.0
Show newest version
package com.causecode.contact

import com.causecode.geo.location.Location
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString

/**
 * Used to store location and contact information.
 *
 */
@ToString(includes = ['id'], includePackage = false)
@EqualsAndHashCode
class Contact {

    Date dateCreated
    Date lastUpdated

    Location address

    String email
    String altEmail
    String facebook
    String twitter
    String linkedIn

    Phone phone

    static constraints = {
        altEmail email: true, nullable: true
        dateCreated bindable: false
        email email: true, nullable: true
        facebook nullable: true, url: true
        twitter nullable: true
        lastUpdated bindable: false
        linkedIn nullable: true
        phone nullable: true
    }

    static mapping = {
        address cascade: 'all'
        phone cascade: 'all'
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy