fixed category in posts

This commit is contained in:
SlimusMinus
2026-06-11 00:52:56 +03:00
parent 5692d8425e
commit e4b07fcbff
5 changed files with 45 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package com.krylov.refound.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.krylov.refound.enums.PostCategory;
import com.krylov.refound.enums.PostStatus;
import com.krylov.refound.enums.PostType;
import jakarta.persistence.CascadeType;
@@ -32,7 +33,8 @@ public class Post {
private String title;
@Column(length = 2000)
private String description;
private String category;
@Enumerated(EnumType.STRING)
private PostCategory category;
private String city;
private String district;
private Double latitude;
@@ -53,5 +55,4 @@ public class Post {
@OneToMany(mappedBy = "post", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Image> images = new ArrayList<>();
}