package cokr.xit.ens.modules.nvsigntalk.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_nv_st_req_his", schema = "", catalog = "", indexes = {
        @Index(name = "idx_snd_dtl_nv_st_req_his_01", columnList = "regist_dt")
})
public class SendDetailNvSigntalkReqHist {

    @Id
//	@GeneratedValue(strategy=GenerationType.AUTO)
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "SendDetailNvSigntalkReqHist_Generator")
    @TableGenerator(table = "ens_seq_generator", name = "SendDetailNvSigntalkReqHist_Generator"
            , pkColumnName = "seq_name", pkColumnValue = "SendDetailNvSigntalkReqHist_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 = "client_doc_id", nullable = true)
    private String clientDocId;

    
    @Column(name = "doc_id", nullable = true)
    private String docId;

    
    @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;

}
