-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.java
More file actions
42 lines (34 loc) · 1.29 KB
/
Copy pathcheck.java
File metadata and controls
42 lines (34 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.sut.se.g13.Entity;
import lombok.*;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.FetchType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Entity;
@Data
@Entity
@NoArgsConstructor
@Table(name="CHECKEQUIPMENT")
public class CheckEquipment {
@Id
@SequenceGenerator(name = "checkEquipment_seq", sequenceName = "checkEquipment_seq")
@GeneratedValue(generator = "checkEquipment_seq", strategy = GenerationType.SEQUENCE)
@Column(name="CHECKEQUIPMENT_ID",unique = true, nullable = true)
private @NonNull Long id;
private @NonNull Date date;
private @NonNull String checklish;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = LicensePlate.class)
@JoinColumn(name="LICENSEPLATE_ID", insertable = true)
private LicensePlate id;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Nurse.class)
@JoinColumn(name="NURSE_ID", insertable = true)
private Nurse id;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Status.class)
@JoinColumn(name="STATUS_ID", insertable = true)
private Status id;
}