package cokr.xit.ens.modules.kkoalimtalk.domain;

import cokr.xit.ens.modules.common.domain.support.FieldError;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;

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

@Entity
@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ens_snd_dtl_kko_at_rslt_his", schema = "", catalog = "", indexes = {
        @Index(name = "idx_snd_dtl_kko_at_rslt_his_01", columnList = "regist_dt")
})
public class SendDetailKkoAlimtalkRsltHist {

    @Id
//	@GeneratedValue(strategy=GenerationType.AUTO)
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "SendDetailKkoAlimtalkRsltHist_Generator")
    @TableGenerator(table = "ens_seq_generator", name = "SendDetailKkoAlimtalkRsltHist_Generator"
            , pkColumnName = "seq_name", pkColumnValue = "SendDetailKkoAlimtalkRsltHist_id"
            , initialValue = 0, allocationSize = 200)
    
    private Long id;               

//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "send_mast_id")

//    private SendMast sendMast;

    
    @Column(nullable = true)
    private String pk;

    
    @Column(nullable = true)
    private String responseCode;

    
    @Column(nullable = true)
    private String msg;

    
    @Column(nullable = true)
//    private String uid; 
    private String uuid;

    
    @Column(nullable = true)
    private String reqMsgIdx;

    
    @Column(nullable = true)
    private String resultCode;

    
    @Column(nullable = true)
    private String requestAt;

    
    @Column(nullable = true)
    private String receivedAt;

    
    @Column(nullable = true)
    private String bsid;

    
    @Column(nullable = true)
    private String sendType;

    
    @Column(nullable = true)
    private String recipientOrder;


    @CreationTimestamp
    @Column(name = "regist_dt", nullable = true)
    private LocalDateTime registDt;

    @Embedded
    @Setter
    private FieldError error;

}
