61 lines
1.5 KiB
Java
61 lines
1.5 KiB
Java
package kr.co.ragone.domain;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import jakarta.persistence.*;
|
|
import lombok.*;
|
|
import java.time.LocalDateTime;
|
|
|
|
@Entity
|
|
@Table(name = "TB_DOC_INFO")
|
|
@Getter
|
|
@Setter
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Builder
|
|
public class DocInfo {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
@Column(name = "doc_id")
|
|
private Long docId;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "topic_id")
|
|
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
|
|
private TopicInfo topicInfo;
|
|
|
|
@Column(name = "file_name", nullable = false, length = 255)
|
|
private String fileName;
|
|
|
|
@Column(name = "original_name", length = 255)
|
|
private String originalName;
|
|
|
|
@Column(name = "file_path", length = 500)
|
|
private String filePath;
|
|
|
|
@Column(name = "file_size")
|
|
private Long fileSize;
|
|
|
|
@Column(name = "file_type", length = 50)
|
|
private String fileType;
|
|
|
|
@Column(name = "chunk_count")
|
|
@Builder.Default
|
|
private Integer chunkCount = 0;
|
|
|
|
@Column(name = "doc_status", length = 20)
|
|
@Builder.Default
|
|
private String docStatus = "PENDING";
|
|
|
|
@Column(name = "error_msg", columnDefinition = "TEXT")
|
|
private String errorMsg;
|
|
|
|
@Column(name = "created_at")
|
|
@Builder.Default
|
|
private LocalDateTime createdAt = LocalDateTime.now();
|
|
|
|
@Column(name = "updated_at")
|
|
@Builder.Default
|
|
private LocalDateTime updatedAt = LocalDateTime.now();
|
|
}
|