1 package net.sumaris.core.model.referential.grouping;
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.dao.technical.model.IEntity;
28 import net.sumaris.core.model.referential.IItemReferentialEntity;
29
30 import javax.persistence.*;
31
32
33
34
35 @Data
36 @FieldNameConstants
37 @Entity
38 @Table(name = "grouping_item")
39 public class GroupingItem implements IEntity<Integer> {
40
41 @Id
42 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "GROUPING_ITEM_SEQ")
43 @SequenceGenerator(name = "GROUPING_ITEM_SEQ", sequenceName="GROUPING_ITEM_SEQ")
44 private Integer id;
45
46 @Column(name = "object_id")
47 private Integer objectId;
48
49 @Column(length = IItemReferentialEntity.LENGTH_COMMENTS)
50 private String comments;
51
52 @ManyToOne(fetch = FetchType.LAZY)
53 @JoinColumn(name = "grouping_fk", nullable = false)
54 private Grouping grouping;
55 }