This commit is contained in:
@@ -52,4 +52,7 @@ public class ComplaintEntity {
|
||||
@Column(name = "updated_at")
|
||||
@LastModifiedDate
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
@Column(name = "not_moderated_file")
|
||||
private Boolean not_moderated_file;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,9 @@ public class FileEntity {
|
||||
@Column(name = "medium_path")
|
||||
private String mediumPath;
|
||||
|
||||
@Column(name = "moderation_reason_id")
|
||||
private Long moderationReasonId;
|
||||
|
||||
@OneToOne(mappedBy = "file", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@JsonIgnore
|
||||
private ImageHashEntity imageHash;
|
||||
|
||||
@@ -7,5 +7,8 @@ public enum FileStatus {
|
||||
VIOLATION,
|
||||
CHECKED,
|
||||
ERROR,
|
||||
TEMP
|
||||
TEMP,
|
||||
REMOVED,
|
||||
MODERATION,
|
||||
BLOCKED
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package ru.soune.nocopy.entity.file.moderation;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Entity
|
||||
@Table(name = "moderation_reasons")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
public class ModerationReason {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "reason_text", nullable = false, columnDefinition = "TEXT")
|
||||
private String reasonText;
|
||||
|
||||
@CreatedDate
|
||||
@Column(name = "created_at", updatable = false)
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@LastModifiedDate
|
||||
@Column(name = "updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
Reference in New Issue
Block a user