package cokr.xit.ens.biz.iup.domain;

import cokr.xit.ens.biz.iup.code.IupSendSttusCd;
import cokr.xit.ens.biz.iup.code.IupSendTrySttusCd;
import cokr.xit.ens.biz.iup.code.IupSendTypeCd;
import cokr.xit.ens.biz.iup.domain.ids.TbSendResultIds;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

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

@Entity
//@Data
@Getter
@ToString
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_send_result_v2", schema = "", catalog = "")
@IdClass(TbSendResultIds.class)
public class TbSendResult {

    @Id
    @Column(name = "lnk_input_id", nullable = false)
    private Long lnkInputId;

    @Id
    @Column(name = "data_id", nullable = false)
    private String dataId;

    @Id
    @Column(name = "prcs_odr", nullable = false)
    private String prcsOdr;

    
    @Column(name = "send_sttus_cd", nullable = true)
    @Enumerated(EnumType.STRING)
    private IupSendSttusCd sendSttusCd;

    
    @Column(name = "send_try_sttus_cd", nullable = true)
    @Enumerated(EnumType.STRING)
    private IupSendTrySttusCd sendTrySttusCd;

    
    @Column(name = "send_type", nullable = true)
    @Enumerated(EnumType.STRING)
    private IupSendTypeCd sendType;

    
    @Column(name = "run_dt", nullable = true)
    private LocalDateTime runDt;

    
    @Column(name = "biz_send_dt", nullable = true)
    private LocalDateTime bizSendDt;

    
    @Column(name = "biz_recv_dt", nullable = true)
    private LocalDateTime bizRecvDt;

    
    @Column(name = "biz_read_dt", nullable = true)
    private LocalDateTime bizReadDt;

    
    @Column(name = "biz_err_msg", nullable = true, length = 1000)
    private String bizErrMsg;

    
    @Column(name = "reg_id", nullable = true)
    private String regId;

    
    @Column(name = "reg_dt", nullable = true)
    @CreationTimestamp
    private LocalDateTime regDt;

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

    
    @Column(name = "expires_dt", nullable = true)
    private LocalDateTime expiresDt;

    
    @Column(name = "prcs_yn", nullable = true)
    private String prcsYn;


}
