feat: implemented most of the backend api for administrator
Some checks failed
Format / formatting (push) Failing after 6s
CI / build (push) Successful in 11s

This commit is contained in:
Pierre Tellier
2025-02-26 14:29:38 +01:00
parent d8bc7cc9b6
commit 1cebebf1a5
11 changed files with 223 additions and 42 deletions

View File

@ -11,34 +11,26 @@ import java.util.List;
@Table(name = "project")
public class Project {
@OneToMany(mappedBy = "projectParticipation", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<Entrepreneur> listEntrepreneurParticipation = new ArrayList<>();
@OneToMany(mappedBy = "projectSectionCell", fetch = FetchType.LAZY, orphanRemoval = true)
private final List<SectionCell> listSectionCell = new ArrayList<>();
@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(
@ -93,4 +85,8 @@ public class Project {
public void setProjectStatus(String projectStatus) {
this.projectStatus = projectStatus;
}
public void setAdministrator(Administrator administrator) {
this.projectAdministrator = administrator;
}
}