package com.kospo.talk.model;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.*;

import java.time.LocalDateTime;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Table(name = "work_logo")
public class WorkLogo {
    @Id
    @Size(max = 20)
    @Column(name = "work_id", nullable = false, length = 20)
    private String workId;

    @Size(max = 100)
    @Column(name = "vnm", length = 100)
    private String vnm;

    @Size(max = 100)
    @Column(name = "onm", length = 100)
    private String onm;

    @Size(max = 100)
    @Column(name = "path", length = 100)
    private String path;

    @Size(max = 100)
    @Column(name = "type", length = 100)
    private String type;

    @Column(name = "size")
    private Long size;
    @NotNull
    @Column(name = "ins_date", nullable = false)
    private LocalDateTime insDate;

/*
TODO [리버스 엔지니어링] 필드를 생성하여 'work_id' 열에 매핑
사용 가능한 액션: 현재 상태대로 주석 해제 | 열 매핑 제거
    @MapsId
    @OneToOne(fetch = FetchType.LAZY, optional = false)
    @OnDelete(action = OnDeleteAction.CASCADE)
    private Work work;
*/
}