Fix: renamed all the tables, with repo and controller associated to them (might have missed some), and fix some key dependency issues

This commit is contained in:
Théo Le Lez
2025-02-19 18:41:37 +01:00
parent 04a73073c1
commit 40afde89b7
54 changed files with 1161 additions and 1101 deletions

View File

@ -1,43 +0,0 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.persistence.PrimaryKeyJoinColumn;
import jakarta.persistence.Table;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "administrateurs")
@PrimaryKeyJoinColumn(name = "id_administrateur", referencedColumnName = "id_utilisateur")
public class Administrateurs extends Utilisateurs {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_projet")
private Projets projetsAdministrateurs;
@OneToMany(mappedBy = "administrateursSections", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Sections> ListSections = new ArrayList<>();
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_rdv")
private RendezVous rendezVousAdministrateurs;
public Administrateurs() {}
public Administrateurs(
String nom_utilisateur,
Long id_utilisateur,
String prenom_utilisateur,
String mail_principal,
String mail_secondaire,
String numero_telephone) {
super(
nom_utilisateur,
id_utilisateur,
prenom_utilisateur,
mail_principal,
mail_secondaire,
numero_telephone);
}
}

View File

@ -0,0 +1,43 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.persistence.PrimaryKeyJoinColumn;
import jakarta.persistence.Table;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "administrator")
@PrimaryKeyJoinColumn(name = "idAdministrator", referencedColumnName = "idUser")
public class Administrator extends User {
@OneToMany(mappedBy = "projectAdministrator", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Project> listProject = new ArrayList<>();
/*@OneToMany(mappedBy = "administratorSectionCell", fetch = FetchType.LAZY, orphanRemoval = true)
private List<SectionCell> listSectionCell = new ArrayList<>();*/
// should now be useless
@OneToMany(mappedBy = "administratorAnnotation", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Annotation> listAnnotation = new ArrayList<>();
/*@OneToMany(mappedBy = "administratorAppointment", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<Appointment> listAppointment = new ArrayList<>();*/
// should now be useless
@OneToOne(mappedBy = "administratorAppointment", fetch = FetchType.LAZY, orphanRemoval = true)
private MakeAppointment makeAppointment;
public Administrator() {}
public Administrator(
Long idUser,
String userSurname,
String username,
String mainMail,
String secondaryMail,
String phoneNumber) {
super(idUser, userSurname, username, mainMail, secondaryMail, phoneNumber);
}
}

View File

@ -0,0 +1,39 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
@Entity
@Table(name = "annotation")
public class Annotation {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idAnnotation;
private String comment;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idSectionCell")
private SectionCell sectionCellAnnotation;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idAdministrator")
private Administrator administratorAnnotation;
public Annotation() {}
public Annotation(Long idAnnotation, String commentary) {
this.idAnnotation = idAnnotation;
this.comment = comment;
}
public String getComment() {
return comment;
}
public void setCommentary(String comment) {
this.comment = comment;
}
}

View File

@ -1,8 +1,112 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "appointment")
public class Appointment {
int validated;
int[] akserId;
int[] destId;
String date; // TODO: date type ?
/*@OneToMany(mappedBy = "appointmentEntrepreneurs", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<Entrepreneur> listEntrepreneur =
new ArrayList<>(); */
// should now be useless
@OneToMany(mappedBy = "appointmentReport", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<Report> listReport = new ArrayList<>();
@ManyToMany(
fetch = FetchType.LAZY,
cascade = {CascadeType.ALL})
@JoinTable(
name = "concern",
joinColumns = @JoinColumn(name = "idAppointment"),
inverseJoinColumns = @JoinColumn(name = "idSectionCell"))
List<SectionCell> listSectionCell = new ArrayList<>();
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idAppointment;
private LocalDate appointmentDate;
private LocalTime appointmentTime;
private LocalTime appointmentDuration;
@Column(length = 255)
private String appointmentPlace;
private String appointmentSubject;
public Appointment() {}
public Appointment(
Long idAppointment,
LocalDate appointmentDate,
LocalTime appointmentTime,
LocalTime appointmentDuration,
String appointmentPlace,
String appointmentSubject) {
this.idAppointment = idAppointment;
this.appointmentDate = appointmentDate;
this.appointmentTime = appointmentTime;
this.appointmentDuration = appointmentDuration;
this.appointmentPlace = appointmentPlace;
this.appointmentSubject = appointmentSubject;
}
public Long getIdAppointment() {
return idAppointment;
}
public void setIdAppointment(Long idAppointment) {
this.idAppointment = idAppointment;
}
public LocalDate getAppointmentDate() {
return appointmentDate;
}
public void setAppointmentDate(LocalDate appointmentDate) {
this.appointmentDate = appointmentDate;
}
public LocalTime getAppointmentTime() {
return appointmentTime;
}
public void setAppointmentTime(LocalTime appointmentTime) {
this.appointmentTime = appointmentTime;
}
public LocalTime getAppointmentDuration() {
return appointmentDuration;
}
public void setAppointmentDuration(LocalTime appointmentDuration) {
this.appointmentDuration = appointmentDuration;
}
public String getAppointmentPlace() {
return appointmentPlace;
}
public void setAppointmentPlace(String appointmentPlace) {
this.appointmentPlace = appointmentPlace;
}
public String getAppointmentSubject() {
return appointmentSubject;
}
public void setAppointmentSubject(String appointmentSubject) {
this.appointmentSubject = appointmentSubject;
}
}

View File

@ -1,46 +0,0 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
@Entity
@Table(name = "comptes_rendus")
public class ComptesRendus {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id_compte_rendu;
private String contenu_compte_rendu;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_rdv")
private RendezVous rendezVousComptesRendus;
public ComptesRendus() {}
public ComptesRendus(Long id_compte_rendu, String contenu_compte_rendu) {
this.id_compte_rendu = id_compte_rendu;
this.contenu_compte_rendu = contenu_compte_rendu;
}
public Long getId_compte_rendu() {
return id_compte_rendu;
}
public void setId_compte_rendu(Long id_compte_rendu) {
this.id_compte_rendu = id_compte_rendu;
}
public String getContenu_compte_rendu() {
return contenu_compte_rendu;
}
public void setContenu_compte_rendu(String contenu_compte_rendu) {
this.contenu_compte_rendu = contenu_compte_rendu;
}
}

View File

@ -0,0 +1,8 @@
package enseirb.myinpulse.model;
public class DelAppointment {
int validated;
int[] akserId;
int[] destId;
String date; // TODO: date type ?
}

View File

@ -0,0 +1,7 @@
package enseirb.myinpulse.model;
public class DelProject {
int projectId;
String projectName;
String projectDescription;
}

View File

@ -0,0 +1,6 @@
package enseirb.myinpulse.model;
public class DelReport {
int projectId;
String reportContent;
}

View File

@ -0,0 +1,78 @@
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;
}
}

View File

@ -1,80 +0,0 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
@Entity
@Table(name = "entrepreneurs")
@PrimaryKeyJoinColumn(name = "id_entrepreneur", referencedColumnName = "id_utilisateur")
public class Entrepreneurs extends Utilisateurs {
@Column(length = 255)
private String ecole;
@Column(length = 255)
private String filiere;
private boolean status_snee;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_projet_participation", referencedColumnName = "id_projet")
private Projets projetsParticipation;
// @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 = "id_rdv")
private RendezVous rendezVousEntrepreneurs;
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 String getEcole() {
return ecole;
}
public void setEcole(String ecole) {
this.ecole = ecole;
}
public String getFiliere() {
return filiere;
}
public void setFiliere(String filiere) {
this.filiere = filiere;
}
public boolean isStatus_snee() {
return status_snee;
}
public void setStatus_snee(boolean status_snee) {
this.status_snee = status_snee;
}
}

View File

@ -0,0 +1,28 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
@Entity
@Table(name = "make_apppointment")
public class MakeAppointment {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idMakeAppointment;
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idAdministrator")
private Administrator administratorAppointment;
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idEntrepreneur")
private Entrepreneur entrepreneurAppointment;
public MakeAppointment() {}
public MakeAppointment(Long idMakeAppointment) {
this.idMakeAppointment = idMakeAppointment;
}
}

View File

@ -1,7 +1,96 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "project")
public class Project {
int projectId;
String projectName;
String projectDescription;
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idProject;
@Column(length = 255)
private String projectName;
private byte[] logo;
private LocalDate creationDate;
@Column(length = 255)
private String projectStatus;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idAdministrator")
private Administrator projectAdministrator;
@OneToMany(mappedBy = "projectParticipation", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Entrepreneur> listEntrepreneurParticipation = new ArrayList<>();
@OneToOne(mappedBy = "projectProposed", fetch = FetchType.LAZY, orphanRemoval = true)
private Entrepreneur entrepreneurProposed;
@OneToMany(mappedBy = "projectSectionCell", fetch = FetchType.LAZY, orphanRemoval = true)
private List<SectionCell> listSectionCell = new ArrayList<>();
public Project() {}
public Project(
Long idProject,
String projectName,
byte[] logo,
LocalDate creationDate,
String projectStatus) {
this.idProject = idProject;
this.projectName = projectName;
this.logo = logo;
this.creationDate = creationDate;
this.projectStatus = projectStatus;
}
public Long getIdProject() {
return idProject;
}
public void setIdProject(Long idProject) {
this.idProject = idProject;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public byte[] getLogo() {
return logo;
}
public void setLogo(byte[] logo) {
this.logo = logo;
}
public LocalDate getCreationDate() {
return creationDate;
}
public void setCreationDate(LocalDate creationDate) {
this.creationDate = creationDate;
}
public String getProjectStatus() {
return projectStatus;
}
public void setProjectStatus(String projectStatus) {
this.projectStatus = projectStatus;
}
}

View File

@ -1,98 +0,0 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "projets")
public class Projets {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id_projet;
@Column(length = 255)
private String nom_projet;
private byte[] logo;
private LocalDate date_creation;
@Column(length = 255)
private String status_projet;
@OneToMany(mappedBy = "projetsAdministrateurs", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Administrateurs> listAdministrateurs = new ArrayList<>();
@OneToMany(mappedBy = "projetsParticipation", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Entrepreneurs> ListEntrepreneursParticipation = new ArrayList<>();
@OneToOne(mappedBy = "projetsPropose", fetch = FetchType.LAZY, orphanRemoval = true)
private Entrepreneurs entrepreneursPropose;
@OneToMany(mappedBy = "projetsSections", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Sections> ListSections = new ArrayList<>();
// Hibernate expects entities to have a no-arg constructor,
// though it does not necessarily have to be public.
public Projets() {}
public Projets(
Long id_projet,
String nom_projet,
byte[] logo,
LocalDate date_creation,
String status_projet) {
this.id_projet = id_projet;
this.nom_projet = nom_projet;
this.logo = logo;
this.date_creation = date_creation;
this.status_projet = status_projet;
}
public Long getId_projet() {
return id_projet;
}
public void setId_projet(Long id_projet) {
this.id_projet = id_projet;
}
public String getNom_projet() {
return nom_projet;
}
public void setNom_projet(String nom_projet) {
this.nom_projet = nom_projet;
}
public byte[] getLogo() {
return logo;
}
public void setLogo(byte[] logo) {
this.logo = logo;
}
public LocalDate getDate_creation() {
return date_creation;
}
public void setDate_creation(LocalDate date_creation) {
this.date_creation = date_creation;
}
public String getStatus_projet() {
return status_projet;
}
public void setStatus_projet(String status_projet) {
this.status_projet = status_projet;
}
}

View File

@ -1,111 +0,0 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "rendez_vous")
public class RendezVous {
@OneToMany(mappedBy = "rendezVousEntrepreneurs", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<Entrepreneurs> ListEntrepreneurs = new ArrayList<>();
@OneToMany(mappedBy = "rendezVousAdministrateurs", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<Administrateurs> ListAdministrateurs = new ArrayList<>();
@OneToMany(mappedBy = "rendezVousComptesRendus", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<ComptesRendus> ListComptesRendus = new ArrayList<>();
@ManyToMany(
fetch = FetchType.LAZY,
cascade = {CascadeType.ALL})
@JoinTable(
name = "concerner",
joinColumns = @JoinColumn(name = "id_rdv"),
inverseJoinColumns = @JoinColumn(name = "id_section"))
List<Sections> ListSections = new ArrayList<>();
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id_rdv;
private LocalDate date_rdv;
private LocalTime heure_rdv;
private LocalTime duree_rdv;
@Column(length = 255)
private String lieu_rdv;
private String sujet_rdv;
public RendezVous() {}
public RendezVous(
Long id_rdv,
LocalDate date_rdv,
LocalTime heure_rdv,
LocalTime duree_rdv,
String lieu_rdv,
String sujet_rdv) {
this.id_rdv = id_rdv;
this.date_rdv = date_rdv;
this.heure_rdv = heure_rdv;
this.duree_rdv = duree_rdv;
this.lieu_rdv = lieu_rdv;
this.sujet_rdv = sujet_rdv;
}
public Long getId_rdv() {
return id_rdv;
}
public void setId_rdv(Long id_rdv) {
this.id_rdv = id_rdv;
}
public LocalDate getDate_rdv() {
return date_rdv;
}
public void setDate_rdv(LocalDate date_rdv) {
this.date_rdv = date_rdv;
}
public LocalTime getHeure_rdv() {
return heure_rdv;
}
public void setHeure_rdv(LocalTime heure_rdv) {
this.heure_rdv = heure_rdv;
}
public LocalTime getDuree_rdv() {
return duree_rdv;
}
public void setDuree_rdv(LocalTime duree_rdv) {
this.duree_rdv = duree_rdv;
}
public String getLieu_rdv() {
return lieu_rdv;
}
public void setLieu_rdv(String lieu_rdv) {
this.lieu_rdv = lieu_rdv;
}
public String getSujet_rdv() {
return sujet_rdv;
}
public void setSujet_rdv(String sujet_rdv) {
this.sujet_rdv = sujet_rdv;
}
}

View File

@ -1,6 +1,38 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
@Entity
@Table(name = "report")
public class Report {
int projectId;
String reportContent;
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idReport;
private String reportContent;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idAppointment")
private Appointment appointmentReport;
public Report() {}
public Report(Long idReport, String reportContent) {
this.idReport = idReport;
this.reportContent = reportContent;
}
public String getReportContent() {
return reportContent;
}
public void setReportContent(String reportContent) {
this.reportContent = reportContent;
}
}

View File

@ -0,0 +1,85 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "section_cell")
public class SectionCell {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idSectionCell;
@Column(length = 255)
private String title;
private String contentSectionCell;
private LocalDateTime modificationDate;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idProject")
private Project projectSectionCell;
/*@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idAdministrator")
private Administrator administratorSectionCell;*/
// should now be useless
@ManyToMany(mappedBy = "listSectionCell")
private List<Appointment> appointment = new ArrayList<>();
@OneToMany(mappedBy = "sectionCellAnnotation", fetch = FetchType.LAZY, orphanRemoval = true)
private List<Annotation> listAnnotation = new ArrayList<>();
public SectionCell() {}
public SectionCell(
Long idSectionCell,
String title,
String contentSectionCell,
LocalDateTime modificationDate) {
this.idSectionCell = idSectionCell;
this.title = title;
this.contentSectionCell = contentSectionCell;
this.modificationDate = modificationDate;
}
public Long getIdSectionCell() {
return idSectionCell;
}
public void setIdSectionCell(Long idSectionCell) {
this.idSectionCell = idSectionCell;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContentSectionCell() {
return contentSectionCell;
}
public void setContentSectionCell(String contentSectionCell) {
this.contentSectionCell = contentSectionCell;
}
public LocalDateTime getModificationDate() {
return modificationDate;
}
public void setModificationDate(LocalDateTime modificationDate) {
this.modificationDate = modificationDate;
}
}

View File

@ -1,81 +0,0 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "sections")
public class Sections {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id_section;
@Column(length = 255)
private String titre;
private String contenu_section;
private LocalDateTime date_modification;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_projet")
private Projets projetsSections;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_admnistrateur")
private Administrateurs administrateursSections;
@ManyToMany(mappedBy = "ListSections")
private List<RendezVous> rendezVous = new ArrayList<>();
public Sections() {}
public Sections(
Long id_section,
String titre,
String contenu_section,
LocalDateTime date_modification) {
this.id_section = id_section;
this.titre = titre;
this.contenu_section = contenu_section;
this.date_modification = date_modification;
}
public String getTitre() {
return titre;
}
public void setTitre(String titre) {
this.titre = titre;
}
public Long getId_section() {
return id_section;
}
public void setId_section(Long id_section) {
this.id_section = id_section;
}
public String getContenu_section() {
return contenu_section;
}
public void setContenu_section(String contenu_section) {
this.contenu_section = contenu_section;
}
public LocalDateTime getDate_modification() {
return date_modification;
}
public void setDate_modification(LocalDateTime date_modification) {
this.date_modification = date_modification;
}
}

View File

@ -0,0 +1,95 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
@Entity
@Table(name = "user")
@Inheritance(strategy = InheritanceType.JOINED)
public class User {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idUser;
@Column(length = 255)
private String UserSurname;
@Column(length = 255)
private String UserName;
@Column(length = 255)
private String mainMail;
@Column(length = 255)
private String secondaryMail;
@Column(length = 20)
private String phoneNumber;
public User() {}
public User(
Long idUser,
String userSurname,
String userName,
String mainMail,
String secondaryMail,
String phoneNumber) {
this.idUser = idUser;
this.UserSurname = userSurname;
this.UserName = userName;
this.mainMail = mainMail;
this.secondaryMail = secondaryMail;
this.phoneNumber = phoneNumber;
}
public Long getIdUser() {
return idUser;
}
public void setIdUser(Long idUser) {
this.idUser = idUser;
}
public String getUserSurname() {
return UserSurname;
}
public void setUserSurname(String userSurname) {
UserSurname = userSurname;
}
public String getUserName() {
return UserName;
}
public void setUserName(String userName) {
UserName = userName;
}
public String getMainMail() {
return mainMail;
}
public void setMainMail(String mainMail) {
this.mainMail = mainMail;
}
public String getSecondaryMail() {
return secondaryMail;
}
public void setSecondaryMail(String secondaryMail) {
this.secondaryMail = secondaryMail;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
phoneNumber = phoneNumber;
}
}

View File

@ -1,95 +0,0 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
@Entity
@Table(name = "utilisateurs")
@Inheritance(strategy = InheritanceType.JOINED)
public class Utilisateurs {
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id_utilisateur;
@Column(length = 255)
private String nom_utilisateur;
@Column(length = 255)
private String prenom_utilisateur;
@Column(length = 255)
private String mail_principal;
@Column(length = 255)
private String mail_secondaire;
@Column(length = 20)
private String numero_telephone;
public Utilisateurs() {}
public Utilisateurs(
String nom_utilisateur,
Long id_utilisateur,
String prenom_utilisateur,
String mail_principal,
String mail_secondaire,
String numero_telephone) {
this.nom_utilisateur = nom_utilisateur;
this.id_utilisateur = id_utilisateur;
this.prenom_utilisateur = prenom_utilisateur;
this.mail_principal = mail_principal;
this.mail_secondaire = mail_secondaire;
this.numero_telephone = numero_telephone;
}
public Long getId_utilisateur() {
return id_utilisateur;
}
public void setId_utilisateur(Long id_utilisateur) {
this.id_utilisateur = id_utilisateur;
}
public String getNom_utilisateur() {
return nom_utilisateur;
}
public void setNom_utilisateur(String nom_utilisateur) {
this.nom_utilisateur = nom_utilisateur;
}
public String getPrenom_utilisateur() {
return prenom_utilisateur;
}
public void setPrenom_utilisateur(String prenom_utilisateur) {
this.prenom_utilisateur = prenom_utilisateur;
}
public String getMail_principal() {
return mail_principal;
}
public void setMail_principal(String mail_principal) {
this.mail_principal = mail_principal;
}
public String getMail_secondaire() {
return mail_secondaire;
}
public void setMail_secondaire(String mail_secondaire) {
this.mail_secondaire = mail_secondaire;
}
public String getNumero_telephone() {
return numero_telephone;
}
public void setNumero_telephone(String numero_telephone) {
this.numero_telephone = numero_telephone;
}
}