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

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

import javax.persistence.*;
import java.time.LocalDateTime;

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


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

    
    @Column(name = "sndng_result_sttus", length = 20)
    @Enumerated(EnumType.STRING)
    private SndngResultSttusCd sndngResultSttus;

    
    @Column(name = "requst_dt", length = 14)
    private String requstDt;

    
    @Column(name = "inqire_dt", length = 14)
    private String inqireDt;

    
    @Column(name = "readng_dt", length = 14)
    private String readngDt;

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

    @Embedded
    private FieldCreate create;

    
    @UpdateTimestamp
    @Column(name = "last_updt_dt", nullable = true)
    private LocalDateTime lastUpdtDt;


    
    @Column(name = "sndng_se", length = 10)
    @Enumerated(EnumType.STRING)
    private SndngSeCd sndngSe;
}
