140 lines
3.9 KiB
Java
140 lines
3.9 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(
|
|
String userSurname,
|
|
String username,
|
|
String primaryMail,
|
|
String secondaryMail,
|
|
String phoneNumber,
|
|
String school,
|
|
String course,
|
|
boolean sneeStatus,
|
|
boolean pending) {
|
|
super(userSurname, username, primaryMail, secondaryMail, phoneNumber, pending);
|
|
this.school = school;
|
|
this.course = course;
|
|
this.sneeStatus = sneeStatus;
|
|
}
|
|
|
|
public Entrepreneur(
|
|
String userSurname,
|
|
String username,
|
|
String primaryMail,
|
|
String secondaryMail,
|
|
String phoneNumber,
|
|
String school,
|
|
String course,
|
|
boolean sneeStatus) {
|
|
super(userSurname, username, primaryMail, secondaryMail, phoneNumber, true);
|
|
this.school = school;
|
|
this.course = course;
|
|
this.sneeStatus = sneeStatus;
|
|
}
|
|
|
|
public Entrepreneur(
|
|
String userSurname,
|
|
String userName,
|
|
String primaryMail,
|
|
String secondaryMail,
|
|
String phoneNumber,
|
|
String school,
|
|
String course,
|
|
boolean sneeStatus,
|
|
Project projectParticipation,
|
|
Project projectProposed,
|
|
MakeAppointment makeAppointment,
|
|
boolean pending) {
|
|
super(userSurname, userName, primaryMail, secondaryMail, phoneNumber, pending);
|
|
this.school = school;
|
|
this.course = course;
|
|
this.sneeStatus = sneeStatus;
|
|
this.projectParticipation = projectParticipation;
|
|
this.projectProposed = projectProposed;
|
|
this.makeAppointment = makeAppointment;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
public Project getProjectParticipation() {
|
|
return projectParticipation;
|
|
}
|
|
|
|
public void setProjectParticipation(Project projectParticipation) {
|
|
this.projectParticipation = projectParticipation;
|
|
}
|
|
|
|
public Project getProjectProposed() {
|
|
return projectProposed;
|
|
}
|
|
|
|
public void setProjectProposed(Project projectProposed) {
|
|
this.projectProposed = projectProposed;
|
|
}
|
|
|
|
public MakeAppointment getMakeAppointment() {
|
|
return makeAppointment;
|
|
}
|
|
|
|
public void setMakeAppointment(MakeAppointment makeAppointment) {
|
|
this.makeAppointment = makeAppointment;
|
|
}
|
|
}
|