Created
September 30, 2009 22:27
-
-
Save felipero/198517 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pessoa implements Serializable { | |
static hasMany = [atendimentos:Atendimento] | |
String nome | |
Endereco endereco | |
static constraints = { | |
endereco(nullable:true) | |
} | |
} | |
class Paciente extends Pessoa { | |
} | |
class Medico extends Pessoa { | |
String especialidade | |
} | |
class Endereco { | |
static belongsTo = [Pessoa] | |
String logradouro | |
String bairro | |
String cidade | |
String estado | |
Pessoa pessoa | |
} | |
class Atendimento { | |
static belongsTo = [paciente:Paciente, medico:Medico] | |
Paciente paciente | |
Medico medico | |
String queixa | |
Date data | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment