fix: issue with foreign keys
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package enseirb.myinpulse.postgres_db.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@@ -9,58 +9,72 @@ import jakarta.persistence.Table;
|
||||
@PrimaryKeyJoinColumn(name = "id_entrepreneur")
|
||||
public class Entrepreneurs extends Utilisateurs {
|
||||
|
||||
@Column(length=255)
|
||||
private String ecole;
|
||||
@Column(length = 255)
|
||||
private String ecole;
|
||||
|
||||
@Column(length=255)
|
||||
private String filiere;
|
||||
@Column(length = 255)
|
||||
private String filiere;
|
||||
|
||||
private boolean status_snee;
|
||||
private boolean status_snee;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "Projets.id_projets")
|
||||
private Projets projets_participation;
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "id_projet_participation", referencedColumnName = "id_projet")
|
||||
private Projets projetsParticipation;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "Projets.id_projets")
|
||||
private Projets projets_propose;
|
||||
// @Column(insertable=false, updatable=false)
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "id_projet_propose", referencedColumnName = "id_projet")
|
||||
private Projets projetsPropose;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "RendezVous.id_rdv")
|
||||
private RendezVous rendezVous;
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "id_rdv")
|
||||
private RendezVous rendezVousEntrepreneurs;
|
||||
|
||||
public Entrepreneurs() {}
|
||||
|
||||
public Entrepreneurs() {
|
||||
}
|
||||
public Entrepreneurs(
|
||||
String nom_utilisateur,
|
||||
Long id_utilisateur,
|
||||
String prenom_utilisateur,
|
||||
String mail_principal,
|
||||
String mail_secondaire,
|
||||
String numero_telephone,
|
||||
String ecole,
|
||||
boolean status_snee,
|
||||
String filiere) {
|
||||
super(
|
||||
nom_utilisateur,
|
||||
id_utilisateur,
|
||||
prenom_utilisateur,
|
||||
mail_principal,
|
||||
mail_secondaire,
|
||||
numero_telephone);
|
||||
this.ecole = ecole;
|
||||
this.status_snee = status_snee;
|
||||
this.filiere = filiere;
|
||||
}
|
||||
|
||||
public Entrepreneurs(String nom_utilisateur, Long id_utilisateur, String prenom_utilisateur, String mail_principal, String mail_secondaire, String numero_telephone, String ecole, boolean status_snee, String filiere) {
|
||||
super(nom_utilisateur, id_utilisateur, prenom_utilisateur, mail_principal, mail_secondaire, numero_telephone);
|
||||
this.ecole = ecole;
|
||||
this.status_snee = status_snee;
|
||||
this.filiere = filiere;
|
||||
}
|
||||
public String getEcole() {
|
||||
return ecole;
|
||||
}
|
||||
|
||||
public String getEcole() {
|
||||
return ecole;
|
||||
}
|
||||
public void setEcole(String ecole) {
|
||||
this.ecole = ecole;
|
||||
}
|
||||
|
||||
public void setEcole(String ecole) {
|
||||
this.ecole = ecole;
|
||||
}
|
||||
public String getFiliere() {
|
||||
return filiere;
|
||||
}
|
||||
|
||||
public String getFiliere() {
|
||||
return filiere;
|
||||
}
|
||||
public void setFiliere(String filiere) {
|
||||
this.filiere = filiere;
|
||||
}
|
||||
|
||||
public void setFiliere(String filiere) {
|
||||
this.filiere = filiere;
|
||||
}
|
||||
public boolean isStatus_snee() {
|
||||
return status_snee;
|
||||
}
|
||||
|
||||
public boolean isStatus_snee() {
|
||||
return status_snee;
|
||||
}
|
||||
|
||||
public void setStatus_snee(boolean status_snee) {
|
||||
this.status_snee = status_snee;
|
||||
}
|
||||
public void setStatus_snee(boolean status_snee) {
|
||||
this.status_snee = status_snee;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user