Dev add support id
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-01-20 21:55:42 +07:00
parent f0a87648cf
commit 60678ef889
5 changed files with 18 additions and 48 deletions
@@ -2,10 +2,13 @@ package ru.soune.nocopy.entity.file;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.GenerationTime;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.time.LocalDateTime;
@Data
@@ -16,11 +19,13 @@ import java.time.LocalDateTime;
@Table(name = "file_entities")
@EntityListeners(AuditingEntityListener.class)
public class FileEntity {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
private String id;
@Column(name = "support_id", unique = true, updatable = false)
private Integer supportId;
@Column(name = "user_id", nullable = false)
private Long userId;
@@ -70,9 +75,4 @@ public class FileEntity {
}
this.updatedAt = LocalDateTime.now();
}
@PreUpdate
public void preUpdate() {
this.updatedAt = LocalDateTime.now();
}
}