package com.bio.bio_backend.domain.base.file.entity;

import com.bio.bio_backend.global.constants.AppConstants;
import com.bio.bio_backend.global.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.Comment;

@Entity
@Table(name = AppConstants.TABLE_PREFIX + "file")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class File extends BaseEntity {
    
    @Column(nullable = false)
    @Comment("원본 파일명")
    private String originalFileName;
    
    @Column(nullable = false)
    @Comment("저장 파일명")
    private String storedFileName;
    
    @Column(nullable = false)
    @Comment("파일 경로")
    private String filePath;
        
    @Column(nullable = false)
    @Comment("파일 크기")
    private Long fileSize;
    
    @Column(nullable = false)
    @Comment("콘텐츠 타입")
    private String contentType;
    
    @Column
    @Comment("설명")
    private String description;
    
    @Column
    @Comment("그룹 OID")
    private Long groupOid;
    
    @Column(nullable = false)
    @Comment("사용 여부")
    @Builder.Default
    private Boolean useFlag = true;
}
