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

yakworks.rally.orgs.model.ContactEmail.groovy Maven / Gradle / Ivy

There is a newer version: 7.3.76
Show newest version
/*
* Copyright 2021 Yak.Works - Licensed under the Apache License, Version 2.0 (the "License")
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
package yakworks.rally.orgs.model

import gorm.tools.repository.model.RepoEntity
import grails.compiler.GrailsCompileStatic
import grails.persistence.Entity
import yakworks.security.audit.AuditStamp

@Entity
@AuditStamp
@GrailsCompileStatic
class ContactEmail implements RepoEntity, Serializable {

    String kind //FIXME is this used?
    String address
    Boolean isPrimary = false

    static Map includes = [
        stamp: ['id', 'address', 'kind']  //picklist or minimal for joins
    ]

    static belongsTo = [contact: Contact]

    static mapping = {
        cache "nonstrict-read-write"
        contact column: "contactId"
    }

    static constraintsMap = [
        kind:[ description: 'future use', maxSize: 50],
        address:[ description: 'The email addy', nullable: false, maxSize: 50],
        isPrimary:[ description: 'If this is the contacts primary email', nullable: false, required: false],
    ]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy