Rev 1863 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1505 | jmachado | 1 | <?xml version="1.0"?> |
2 | <!DOCTYPE hibernate-mapping |
||
3 | PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" |
||
4 | "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
||
5 | |||
6 | <hibernate-mapping> |
||
7 | |||
8 | <class name="pt.estgp.estgweb.domain.EventClass" table="event_class" abstract="true"> |
||
1524 | jmachado | 9 | <meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
1505 | jmachado | 10 | <meta attribute="scope-class">public abstract</meta> |
11 | <id name="id" type="long"> |
||
12 | <generator class="native"/> |
||
13 | </id> |
||
14 | <discriminator column="discrimitator"/> |
||
1992 | grupo5 | 15 | <timestamp name="updateDate" unsaved-value="null"/> |
1505 | jmachado | 16 | <property name="saveDate" type="timestamp"/> |
17 | <property name="name" type="string"/> |
||
18 | <property name="description" type="string"> |
||
19 | <column name="description" sql-type="TEXT"/> |
||
20 | </property> |
||
1524 | jmachado | 21 | <property name="eventosGenericos" type="boolean"/> |
22 | <property name="eventosFormacoes" type="boolean"/> |
||
23 | <property name="managersRole" type="string"/> |
||
24 | |||
25 | <set name="events" cascade="none" lazy="true"> |
||
26 | <key column="eventClass"/> |
||
27 | <one-to-many class="pt.estgp.estgweb.domain.EventGeneric"/> |
||
28 | </set> |
||
1505 | jmachado | 29 | <subclass name="pt.estgp.estgweb.domain.EventClassImpl" discriminator-value="EventClassImpl"/> |
30 | </class> |
||
31 | |||
32 | <class name="pt.estgp.estgweb.domain.EventGeneric" table="event_generic" abstract="true"> |
||
33 | <meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
||
34 | <meta attribute="scope-class">public abstract</meta> |
||
35 | <id name="id" type="long"> |
||
36 | <generator class="native"/> |
||
37 | </id> |
||
38 | <discriminator column="discrimitator"/> |
||
1992 | grupo5 | 39 | <timestamp name="updateDate" unsaved-value="null"/> |
1505 | jmachado | 40 | <property name="saveDate" type="timestamp"/> |
41 | |||
1524 | jmachado | 42 | <!--Controlo--> |
43 | <!--OK--><property name="ativo" type="boolean"/><!--Flag Geral de Finalizacao, Tem de desativar das API's--> |
||
44 | <!--OK--><property name="dataAberturaFormulario" type="timestamp"/> |
||
45 | <!--OK--><property name="dataFechoFormulario" type="timestamp"/> <!-- Tem de desativar das API's --> |
||
46 | <!--OK--><property name="dataPublicacao" type="timestamp"/><!--Usado para API's--> |
||
47 | <!--OK--><property name="registeredUsersOnly" type="boolean"/> |
||
48 | <!--OK--><property name="category" type="string"/> |
||
49 | <!--OK--><property name="subCategory" type="string"/> |
||
50 | |||
1505 | jmachado | 51 | <!--Metadata--> |
1524 | jmachado | 52 | <!--OK--><property name="title" type="string"/> |
53 | <!--OK--><property name="description" type="string"> |
||
1505 | jmachado | 54 | <column name="description" sql-type="TEXT"/> |
55 | </property> |
||
1524 | jmachado | 56 | <!--OK--><property name="observacoes" type="string"> |
1505 | jmachado | 57 | <column name="observacoes" sql-type="TEXT"/> |
58 | </property> |
||
1524 | jmachado | 59 | <!--OK--><property name="locais" type="string"> |
60 | <column name="locais" sql-type="TEXT"/> |
||
61 | </property> |
||
62 | |||
63 | <!--OK--><property name="dataInicio" type="timestamp"/> |
||
64 | <!--OK--><property name="flyerRepositoryStream" type="string"/> |
||
65 | <!--OK--><property name="preInformation" type="string"> |
||
1505 | jmachado | 66 | <column name="preInformation" sql-type="TEXT"/> |
67 | </property> |
||
1524 | jmachado | 68 | <!--OK--><property name="afterRegisterInformation" type="string"> |
1505 | jmachado | 69 | <column name="afterRegisterInformation" sql-type="TEXT"/> |
70 | </property> |
||
71 | |||
1524 | jmachado | 72 | |
1505 | jmachado | 73 | <!-- Campos Ativos no Registo --> |
74 | <!--Contactos Info Pessoal--> |
||
75 | <!--<property name="nome" type="boolean"/> já assumido para registo--> |
||
76 | <!--<property name="mail" type="boolean"/> já assumido para registo--> |
||
1524 | jmachado | 77 | <!--OK--><property name="sexo" type="boolean"/> |
78 | <!--OK--><property name="morada" type="boolean"/> <!--Implica ADDRESS, ZIP, CIDADE--> |
||
79 | <!--OK--><property name="pais" type="boolean"/> |
||
80 | <!--OK--><property name="dataNascimento" type="boolean"/> |
||
81 | <!--OK--><property name="nif" type="boolean"/> |
||
82 | <!--OK--><property name="bi" type="boolean"/> |
||
83 | <!--OK--><property name="telefone1" type="boolean"/> |
||
84 | <!--OK--><property name="telefone2" type="boolean"/> |
||
85 | <!--OK--><property name="empresa" type="boolean"/> |
||
86 | <!--OK--><property name="escolaridade" type="boolean"/> |
||
87 | <!--OK--><property name="profissao" type="boolean"/> |
||
1505 | jmachado | 88 | |
89 | <!--Pagamentos |
||
90 | <property name="custoInscricao" type="boolean"/> |
||
91 | <property name="custoAtas" type="boolean"/> |
||
92 | --> |
||
1524 | jmachado | 93 | |
1505 | jmachado | 94 | <many-to-one name="owner" class="pt.estgp.estgweb.domain.User" lazy="proxy" outer-join="false"/> |
1524 | jmachado | 95 | <many-to-one name="eventClass" class="pt.estgp.estgweb.domain.EventClass" lazy="proxy" outer-join="false"/> |
96 | |||
97 | <set name="eventRecords" cascade="none" lazy="true"> |
||
98 | <key column="event"/> |
||
99 | <one-to-many class="pt.estgp.estgweb.domain.EventGenericRecord"/> |
||
100 | </set> |
||
101 | |||
1505 | jmachado | 102 | <subclass name="pt.estgp.estgweb.domain.EventGenericImpl" discriminator-value="EventGenericImpl"> |
103 | <subclass name="pt.estgp.estgweb.domain.EventFormacoes"> |
||
104 | <meta attribute="extends">pt.estgp.estgweb.domain.EventGenericImpl</meta> |
||
105 | <meta attribute="scope-class">public abstract</meta> |
||
106 | |||
107 | <property name="referencia" type="string"/><!--(Ex: AF201516#02)--> |
||
108 | <property name="unidadeOrganica" type="string"/><!--(ESTG, ESEP, ...)--> |
||
109 | <property name="localDeRealizacao" type="string"/><!--(Sala, Laboratório, ...)--> |
||
110 | <property name="dominio" type="string"/> <!--(Gestão, Informática, Marketing, ...)--> |
||
1524 | jmachado | 111 | <property name="outroDominio" type="string"/> |
1505 | jmachado | 112 | <property name="destinatarios" type="string"/> |
1524 | jmachado | 113 | <property name="conteudos" type="string"> |
114 | <column name="conteudos" sql-type="MEDIUMTEXT"/> |
||
115 | </property> |
||
116 | |||
117 | <property name="status" type="string"/><!--(Em construção, Ativa, Concluída)--> |
||
1505 | jmachado | 118 | <property name="numeroVagas" type="integer"/> |
119 | <property name="duracaoHoras" type="integer"/> |
||
120 | <property name="ects" type="integer"/> |
||
1524 | jmachado | 121 | <!-- o mesmo da dataInicio <property name="dataRealizacao" type="integer"/>--> |
1505 | jmachado | 122 | <property name="diasDuracao" type="integer"/> |
123 | <property name="custoFormacao" type="double"/> <!--(moeda Euros)--> |
||
124 | <property name="precoFormando" type="double"/> <!--(moeda Euros)--> |
||
125 | <property name="percentagemMinimaLucro" type="double"/> <!--(%)--> |
||
126 | |||
1524 | jmachado | 127 | |
128 | |||
1505 | jmachado | 129 | <property name="formadores" type="string"/> |
130 | |||
131 | <subclass name="pt.estgp.estgweb.domain.EventFormacoesImpl" discriminator-value="EventFormacoesImpl"/> |
||
132 | |||
133 | </subclass> |
||
134 | </subclass> |
||
135 | </class> |
||
136 | |||
137 | <class name="pt.estgp.estgweb.domain.EventUser" table="event_user" abstract="true"> |
||
138 | <meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
||
139 | <meta attribute="scope-class">public abstract</meta> |
||
140 | <id name="id" type="long"> |
||
141 | <generator class="native"/> |
||
142 | </id> |
||
143 | <discriminator column="discrimitator"/> |
||
1992 | grupo5 | 144 | <timestamp name="updateDate" unsaved-value="null"/> |
1505 | jmachado | 145 | <property name="saveDate" type="timestamp"/> |
146 | <property name="email" type="string"/> |
||
147 | <property name="password" type="string"/> <!-- MD5 um user afeta a password sempre que se inscreve mas o email é a ponte para todos os seus registos --> |
||
1524 | jmachado | 148 | |
149 | <!-- Campos de Registo OS MESMOS QUE EM EventGenericRecord--> |
||
150 | |||
151 | <!--Contactos Info Pessoal--> |
||
152 | <!--Obrigatorios--> |
||
153 | <property name="mail" type="string"/> |
||
154 | <property name="nome" type="string"/> |
||
155 | |||
156 | <!--opcionais--> |
||
157 | <property name="sexo" type="string"/> |
||
158 | |||
159 | <property name="morada" type="string"/> |
||
160 | <property name="zip" type="string"/> |
||
161 | <property name="cidade" type="string"/> |
||
162 | |||
163 | |||
164 | <property name="dataNascimento" type="string"/> |
||
165 | <property name="nif" type="string"/> |
||
166 | <property name="bi" type="string"/> |
||
167 | <property name="telefone1" type="string"/> |
||
168 | <property name="telefone2" type="string"/> |
||
169 | |||
170 | <property name="empresa" type="string"/> |
||
171 | <property name="pais" type="string"/> |
||
172 | <property name="escolaridade" type="string"/> <!--12 ano, Bacharelato, Licenciatura, Mestrado, Doutoramento, Outro--> |
||
173 | <property name="profissao" type="string"/> |
||
174 | <!--#########################################--> |
||
175 | |||
1505 | jmachado | 176 | <many-to-one name="registeredUserAssociated" class="pt.estgp.estgweb.domain.User" lazy="proxy" outer-join="false"/> |
177 | <subclass name="pt.estgp.estgweb.domain.EventUserImpl" discriminator-value="EventUserImpl"/> |
||
178 | </class> |
||
179 | |||
180 | <class name="pt.estgp.estgweb.domain.EventGenericRecord" table="event_generic_record" abstract="true"> |
||
181 | <meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
||
182 | <meta attribute="scope-class">public abstract</meta> |
||
183 | <id name="id" type="long"> |
||
184 | <generator class="native"/> |
||
185 | </id> |
||
186 | <discriminator column="discrimitator"/> |
||
1992 | grupo5 | 187 | <timestamp name="updateDate" unsaved-value="null"/> <!-- devem apagados registos sem confirmacao de email após 48 horas --> |
1505 | jmachado | 188 | <property name="saveDate" type="timestamp"/> |
189 | <property name="password" type="string"/> <!-- MD5 um user afeta a password sempre que se inscreve mas o email é a ponte para todos os seus registos --> |
||
190 | |||
191 | <!-- Campos de Registo --> |
||
192 | |||
193 | <!--Contactos Info Pessoal--> |
||
194 | <!--Obrigatorios--> |
||
195 | <property name="mail" type="string"/> |
||
196 | <property name="nome" type="string"/> |
||
197 | |||
198 | <!--opcionais--> |
||
199 | <property name="sexo" type="string"/> |
||
200 | |||
201 | <property name="morada" type="string"/> |
||
202 | <property name="zip" type="string"/> |
||
203 | <property name="cidade" type="string"/> |
||
204 | |||
205 | |||
206 | <property name="dataNascimento" type="string"/> |
||
207 | <property name="nif" type="string"/> |
||
208 | <property name="bi" type="string"/> |
||
209 | <property name="telefone1" type="string"/> |
||
210 | <property name="telefone2" type="string"/> |
||
211 | |||
212 | <property name="empresa" type="string"/> |
||
213 | <property name="pais" type="string"/> |
||
214 | <property name="escolaridade" type="string"/> <!--12 ano, Bacharelato, Licenciatura, Mestrado, Doutoramento, Outro--> |
||
215 | <property name="profissao" type="string"/> |
||
216 | |||
217 | |||
1524 | jmachado | 218 | |
1505 | jmachado | 219 | <!--Controlo--> |
1524 | jmachado | 220 | <property name="chaveConfirmacao" type="string"/><!--Chave enviada ao user no email--> |
221 | |||
1505 | jmachado | 222 | <property name="emailConfirmado" type="boolean"/><!--fica verdadeiro apenas apos verificacao do email--> |
223 | |||
224 | <property name="confirmado" type="boolean"/> |
||
225 | <property name="observacoes" type="string"> |
||
226 | <column name="observacoes" sql-type="TEXT"/> |
||
227 | </property> |
||
228 | <property name="pago" type="boolean"/> |
||
229 | <property name="transacaoInfo" type="string"> |
||
230 | <column name="transacaoInfo" sql-type="TEXT"/> |
||
231 | </property> |
||
232 | |||
1524 | jmachado | 233 | <many-to-one name="event" class="pt.estgp.estgweb.domain.EventGeneric" lazy="proxy" outer-join="false"/> |
1505 | jmachado | 234 | <many-to-one name="eventUserAssociated" class="pt.estgp.estgweb.domain.EventUser" lazy="proxy" outer-join="false"/> |
235 | |||
236 | <subclass name="pt.estgp.estgweb.domain.EventGenericRecordImpl" discriminator-value="EventGenericRecordImpl"/> |
||
237 | </class> |
||
238 | |||
239 | </hibernate-mapping> |