package cokr.xit.ens.modules.kkomydoc.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_md_req_his", schema = "", catalog = "", indexes = {
        @Index(name = "idx_snd_dtl_kko_md_req_his_01", columnList = "regist_dt")
})
public class SendDetailKkoMydocReqHist {

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

   
//    @JoinColumn(name = "send_mast_id")

//    private SendMast sendMast;
    
    @Column(name = "send_detail_id", nullable = true)
    private Long sendDetailId;

    
    @Column(name = "send_raw_msg", nullable = false, length = 4000)
    private String sendRawMsg;

    
    @Column(name = "external_document_uuid", nullable = true)
    private String externalDocumentUuid;

    
    @Column(name = "document_binder_uuid", nullable = true)
    private String documentBinderUuid;

    
    @Column(name = "resp_raw_msg", nullable = true, length = 1000)
    private String respRawMsg;

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

    @Embedded
    @Setter
    private FieldError error;

}
