1 package net.sumaris.core.model.referential.taxon;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import lombok.Data;
26 import lombok.experimental.FieldNameConstants;
27 import net.sumaris.core.model.referential.IItemReferentialEntity;
28 import net.sumaris.core.model.referential.Status;
29
30 import javax.persistence.*;
31 import java.util.Date;
32
33
34
35
36
37
38
39
40
41 @Data
42 @FieldNameConstants
43 @Entity
44 @Table(name = "taxon_group_type")
45 public class TaxonGroupType implements IItemReferentialEntity {
46
47 @Id
48 @GeneratedValue(strategy=GenerationType.SEQUENCE, generator = "TAXON_GROUP_TYPE_SEQ")
49 @SequenceGenerator(name = "TAXON_GROUP_TYPE_SEQ", sequenceName="TAXON_GROUP_TYPE_SEQ")
50 private Integer id;
51
52 @ManyToOne(fetch = FetchType.LAZY)
53 @JoinColumn(name = "status_fk", nullable = false)
54 private Status status;
55
56 @Column(name = "creation_date", nullable = false)
57 @Temporal(TemporalType.TIMESTAMP)
58 private Date creationDate;
59
60 @Column(name = "update_date")
61 @Temporal(TemporalType.TIMESTAMP)
62 private Date updateDate;
63
64 @Column(nullable = false, length = LENGTH_LABEL)
65 private String label;
66
67 @Column(nullable = false, length = LENGTH_NAME)
68 private String name;
69
70 private String description;
71
72 @Column(length = LENGTH_COMMENTS)
73 private String comments;
74 }