Implemented project handling and updated property components according to front-end needs

This commit is contained in:
2025-09-12 23:41:58 +02:00
parent 5eb6b6e738
commit 8b6083c1c0
9 changed files with 576 additions and 7 deletions

View File

@@ -1,8 +1,10 @@
package de.iwomm.propify_api.entity;
import com.fasterxml.jackson.annotation.JsonBackReference;
import jakarta.persistence.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@@ -41,6 +43,19 @@ public class Property {
private LocalDateTime updatedAt;
@OneToMany(mappedBy = "property", cascade = CascadeType.PERSIST, orphanRemoval = true)
@OrderBy("createdAt")
@JsonBackReference
private List<Project> projects = new ArrayList<>();
public List<Project> getProjects() {
return projects;
}
public void setProjects(List<Project> projects) {
this.projects = projects;
}
public List<Attachment> getAttachments() {
return attachments;
}