add methods and lib for protection files
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-01-08 03:22:32 +07:00
parent 3a9a5b48a2
commit f136ac1f0a
10 changed files with 317 additions and 0 deletions
@@ -60,11 +60,26 @@ public class FileEntity {
@Column(name = "updated_at")
private LocalDateTime updatedAt;
@Column(name = "protected_file_path")
private String protectedFilePath;
@Column(name = "protection_status")
@Enumerated(EnumType.STRING)
private ProtectionStatus protectionStatus;
@Column(name = "protected_at")
private LocalDateTime protectedAt;
@PrePersist
public void prePersist() {
if (this.status == null) {
this.status = FileStatus.ACTIVE;
}
if (this.protectionStatus == null) {
this.protectionStatus = ProtectionStatus.NOT_PROTECTED;
}
if (this.createdAt == null) {
this.createdAt = LocalDateTime.now();
}