-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathInterviewAppointment.java
More file actions
executable file
·61 lines (50 loc) · 1.74 KB
/
Copy pathInterviewAppointment.java
File metadata and controls
executable file
·61 lines (50 loc) · 1.74 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.cpe.backend.interview.entity;
import lombok.*;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import com.cpe.backend.application.entity.Application;
import com.cpe.backend.registercompany.entity.Company;
import com.cpe.backend.registercompany.entity.Province;
@Data
@Entity
@NoArgsConstructor
@Table(name="InterviewAppointment")
public class InterviewAppointment {
@Id
@SequenceGenerator(name="Interview_seq",sequenceName="Interview_seq")
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="Interview_seq")
@Column(name="Interview_ID",unique = true, nullable = true)
private @NonNull Long id;
@Column(name="Interview_Date")
private @NonNull Date date;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Company.class)
@JoinColumn(name = "Company_ID", insertable = true)
private Company company;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Application.class)
@JoinColumn(name = "APPLICATION_ID", insertable = true)
private Application application;
@ManyToOne(fetch = FetchType.EAGER, targetEntity = Province.class)
@JoinColumn(name = "Province_ID", insertable = true)
private Province province;
public void setCompany(Company company) {
this.company=company;
}
public void setApplication(Application application) {
this.application=application;
}
public void setProvince(Province province) {
this.province=province;
}
public void setInterview(Date date) {
this.date=date;
}
}