feat: renamex title to sectionId and added a new shared API call
Some checks failed
Format / formatting (push) Failing after 5s
CI / build (push) Successful in 11s

This commit is contained in:
Pierre Tellier
2025-02-26 15:55:33 +01:00
parent 8d4dc7916d
commit 5c3b2b138d
7 changed files with 61 additions and 108 deletions

View File

@ -11,42 +11,39 @@ import java.util.List;
@Table(name = "section_cell")
public class SectionCell {
@ManyToMany(mappedBy = "listSectionCell")
private final List<Appointment> appointment = new ArrayList<>();
@OneToMany(mappedBy = "sectionCellAnnotation", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<Annotation> listAnnotation = new ArrayList<>();
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idSectionCell;
@Column(length = 255)
private String title;
@Column() private long sectionId;
private String contentSectionCell;
/*@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "idAdministrator")
private Administrator administratorSectionCell;*/
// should now be useless
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,
Long sectionId,
String contentSectionCell,
LocalDateTime modificationDate) {
this.idSectionCell = idSectionCell;
this.title = title;
this.sectionId = sectionId;
this.contentSectionCell = contentSectionCell;
this.modificationDate = modificationDate;
}
@ -59,12 +56,12 @@ public class SectionCell {
this.idSectionCell = idSectionCell;
}
public String getTitle() {
return title;
public Long getSectionId() {
return sectionId;
}
public void setTitle(String title) {
this.title = title;
public void setSectionId(Long sectionId) {
this.sectionId = sectionId;
}
public String getContentSectionCell() {