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_ott_his", schema = "", catalog = "", indexes = {
        @Index(name = "idx_snd_dtl_nv_st_ott_his_01", columnList = "regist_dt")
})
public class SendDetailNvSigntalkTokenHist {

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

    
    @Column(name = "client_doc_id", nullable = true, length = 100)
    private String clientDocId;

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

    
    @Column(name = "nonce", nullable = true, length = 32)
    private String nonce;

    
    @Column(name = "result", nullable = true, length = 10)
    private String result;

    
    @Column(name = "send_ts", nullable = true)
    private Long sendTs;

    
    @Column(name = "recv_ts", nullable = true)
    private Long recvTs;

    
    @Column(name = "auth_req_ts", nullable = true)
    private Long authReqTs;

    
    @Column(name = "auth_view_ts", nullable = true)
    private Long authViewTs;

    
    @Column(name = "auth_complete_ts", nullable = true)
    private Long authCompleteTs;

    
    @Column(name = "expire_ts", nullable = true)
    private Long expireTs;

    
    @Column(name = "org_notified_ts", nullable = true)
    private Long orgNotifiedTs;

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

    @Embedded
    private FieldError error;


}
