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

import cokr.xit.ens.biz.traffic.cheonan.signtalk.domain.embeded.FieldCreate;
import cokr.xit.ens.biz.traffic.cheonan.signtalk.domain.embeded.FieldUpdate;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * 전자고지 발송상세
 */
@Getter
@ToString
@Builder
@DynamicUpdate
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "tb_elctrn_ntic_sndng_detail", schema = "", catalog = "", indexes = {
        @Index(name = "idx_tca_ens_detail_01", columnList = "main_code"),
//        @Index(name = "idx_tca_ens_detail_02", columnList = "external_document_uuid"),
})
public class TcaElctrnNticSndngDetail {

    
    @Id
    @Column(name = "elctrn_ntic_sndng_detail_id", length = 20)
    private String elctrnNticSndngDetailId;

    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "elctrn_ntic_sndng_id")
    private TcaElctrnNticSndng elctrnNticSndng;

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

    
    @Column(name = "main_code", length = 20)
    private String mainCode;

    
    @Column(name = "ihidnum", length = 100, updatable = false)
    private String ihidnum;


//    @Lob
//    @Column(name = "cn_detail")
//    private String cnDetail;

    
    @Lob
    @Column(name = "tmplt_msg_data")
    private String tmpltMsgData;

    
    @Lob
    @Column(name = "mobile_page_cn")
    private String mobilePageCn;

    @Embedded
    private FieldCreate create;

    @Embedded
    private FieldUpdate update;

    
    @Column(name = "external_document_uuid", length = 40)
    @Setter
    private String externalDocumentUuid;


    
    @Column(name = "ffnlg_code", length = 2)
    private String ffnlgCode;
    
    @Column(name = "use_instt_idntfc_id")
    private Integer useInsttIdntfcId;
}
