package cokr.xit.ens.biz.traffic.chuncheon.mydoc.domain;

import cokr.xit.ens.biz.traffic.chuncheon.mydoc.domain.embeded.FieldCreate;
import cokr.xit.ens.biz.traffic.chuncheon.mydoc.domain.embeded.FieldUpdate;
import lombok.*;
import org.springframework.context.annotation.Profile;

import javax.persistence.*;

/**
 * <ul>
 * <li>업무 그룹명: 전자고지발송 테이블</li>
 * <li>설 명: </li>
 * <li>작성일: 2021. 12. 22. 오후 5:44:32
 * </ul>
 *
 * @author 박민규
 */
@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "tb_elctrn_ntic_sndng")
@Profile("prod-traffic")
public class ElctrnNticSndng {


    @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 NhtTmplatManage nhtTmplatManage;

    @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
    private String 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;


}
