112 lines
2.8 KiB
Java
112 lines
2.8 KiB
Java
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;
|
|
}
|
|
}
|