1 package net.sumaris.core.model.referential.location;
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 com.vividsolutions.jts.geom.Geometry;
26 import lombok.Data;
27 import lombok.experimental.FieldNameConstants;
28
29 import javax.persistence.*;
30 import java.io.Serializable;
31 import java.util.Date;
32
33 @Data
34 @FieldNameConstants
35 @Entity
36 @Table(name="location_area")
37 public class LocationArea implements Serializable {
38
39 @Id
40 private Integer id;
41
42 @OneToOne(fetch = FetchType.LAZY)
43 @PrimaryKeyJoinColumn(name="id", referencedColumnName="id")
44 private Location location;
45
46 @Column(name = "update_date")
47 @Temporal(TemporalType.TIMESTAMP)
48 private Date updateDate;
49
50 @Column(nullable = false)
51 private Geometry position;
52 }