package cokr.xit.ens.biz.traffic.cheonan.signtalk.domain;

import cokr.xit.ens.biz.traffic.cheonan.code.SndngProcessSttusCd;
import cokr.xit.ens.biz.traffic.cheonan.signtalk.domain.embeded.FieldCreate;
import cokr.xit.ens.biz.traffic.cheonan.signtalk.domain.embeded.FieldUpdate;
import lombok.*;

import javax.persistence.*;

/**
 * 전자고지 발송
 */
@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "tb_elctrn_ntic_sndng")
public class TcaElctrnNticSndng {

    @Id
    @Column(name = "elctrn_ntic_sndng_id", length = 20)
    private String elctrnNticSndngId;

    @Column(name = "signgu_code", length = 5)
    private String signguCode;

    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "nht_tmplat_id")
    private TcaNhtTmplatManage tcaNhtTmplatManage;

    @Column(name = "sndng_ty_code", length = 5)
    private String sndngTyCode;

    @Column(name = "sndng_co", length = 10)
    private Integer sndngCo;

    @Column(name = "sndng_process_sttus", length = 2)
    @Setter
    @Enumerated(EnumType.STRING)
    private SndngProcessSttusCd sndngProcessSttus;

    @Column(name = "sndng_dt", length = 14)
    private String sndngDt;

    @Column(name = "clos_dt", length = 14)
    private String closDt;

    @Embedded
    private FieldCreate create;

    @Embedded
    @Setter
    private FieldUpdate update;

    @Column(name = "error_cn", length = 1000)
    @Setter
    private String errorCn;           

    @Lob
    @Setter
    @Column(name = "error_dtls")
    private String errorDtls;


    @Column(name = "ffnlg_code", length = 2)
    private String ffnlgCode; 

}
