dev add violation notion
Test Workflow / test (push) Successful in 9s

This commit is contained in:
vladp
2026-03-17 16:35:27 +07:00
parent 15d1824757
commit f1e0f9594e
10 changed files with 549 additions and 2 deletions
@@ -0,0 +1,47 @@
package ru.soune.nocopy.entity.violation;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import ru.soune.nocopy.entity.file.FileEntity;
import ru.soune.nocopy.entity.user.User;
import java.time.LocalDateTime;
@Entity
@Getter @Setter
@Table(name = "violation_notions")
@NoArgsConstructor
@EntityListeners(AuditingEntityListener.class)
public class ViolationNotion {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", nullable = false)
@JsonIgnore
private User user;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "file_id", nullable = false)
@JsonIgnore
private FileEntity file;
@CreatedDate
@Column(name = "created_at", updatable = false, nullable = false)
private LocalDateTime createdAt;
@LastModifiedDate
@Column(name = "updated_at", nullable = false)
private LocalDateTime updatedAt;
@Column(name = "message")
private String message;
}