1 package net.sumaris.core.model.file;
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 @Data
34 @FieldNameConstants
35 @Entity
36 @Table(name = "file_status")
37 @Cacheable
38 public class FileStatus implements IItemReferentialEntity {
39
40 @Id
41 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "FILE_STATUS_SEQ")
42 @SequenceGenerator(name = "FILE_STATUS_SEQ", sequenceName="FILE_STATUS_SEQ")
43 private Integer id;
44
45 @Column(nullable = false, length = LENGTH_LABEL)
46 private String label;
47
48 @Column(nullable = false, length = LENGTH_NAME)
49 private String name;
50
51 private String description;
52
53 @Column(length = LENGTH_COMMENTS)
54 private String comments;
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 @ManyToOne(fetch = FetchType.LAZY)
65 @JoinColumn(name = "status_fk", nullable = false)
66 private Status status;
67
68 }