79 lines
2.0 KiB
Java
79 lines
2.0 KiB
Java
package enseirb.myinpulse.model;
|
|
|
|
import jakarta.persistence.*;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.Table;
|
|
|
|
@Entity
|
|
@Table(name = "entrepreneur")
|
|
@PrimaryKeyJoinColumn(name = "idEntrepreneur", referencedColumnName = "idUser")
|
|
public class Entrepreneur extends User {
|
|
|
|
@Column(length = 255)
|
|
private String school;
|
|
|
|
@Column(length = 255)
|
|
private String course;
|
|
|
|
private boolean sneeStatus;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "idProjectParticipation", referencedColumnName = "idProject")
|
|
private Project projectParticipation;
|
|
|
|
// @Column(insertable=false, updatable=false)
|
|
@OneToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "idProjectProposed", referencedColumnName = "idProject")
|
|
private Project projectProposed;
|
|
|
|
/*@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "idAppointment")
|
|
private Appointment appointmentEntrepreneur;*/
|
|
// should now be useless
|
|
|
|
@OneToOne(mappedBy = "entrepreneurAppointment", fetch = FetchType.LAZY, orphanRemoval = true)
|
|
private MakeAppointment makeAppointment;
|
|
|
|
public Entrepreneur() {}
|
|
|
|
public Entrepreneur(
|
|
Long idUser,
|
|
String userSurname,
|
|
String username,
|
|
String mainMail,
|
|
String secondaryMail,
|
|
String phoneNumber,
|
|
String school,
|
|
String course,
|
|
boolean sneeStatus) {
|
|
super(idUser, userSurname, username, mainMail, secondaryMail, phoneNumber);
|
|
this.school = school;
|
|
this.course = course;
|
|
this.sneeStatus = sneeStatus;
|
|
}
|
|
|
|
public String getSchool() {
|
|
return school;
|
|
}
|
|
|
|
public void setSchool(String school) {
|
|
this.school = school;
|
|
}
|
|
|
|
public String getCourse() {
|
|
return course;
|
|
}
|
|
|
|
public void setCourse(String course) {
|
|
this.course = course;
|
|
}
|
|
|
|
public boolean isSneeStatus() {
|
|
return sneeStatus;
|
|
}
|
|
|
|
public void setSneeStatus(boolean statusSnee) {
|
|
this.sneeStatus = sneeStatus;
|
|
}
|
|
}
|