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

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

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

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

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

    
    @Column(name = "token_status", nullable = true)
    private String tokenStatus;

    
    @Column(name = "token_expires_at", nullable = true)
    private Long tokenExpiresAt;

    
    @Column(name = "token_used_at", nullable = true)
    private Long tokenUsedAt;

    
    @Column(name = "doc_box_sent_at", nullable = true)
    private Long docBoxSentAt;

    
    @Column(name = "doc_box_received_at", nullable = true)
    private Long docBoxReceivedAt;

    
    @Column(name = "authenticated_at", nullable = true)
    private Long authenticatedAt;

    
    @Column(name = "user_notified_at", nullable = true)
    private Long userNotifiedAt;

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

    
    @Column(name = "signed_at", nullable = true)
    private String signedAt;

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

    @Embedded
    private FieldError error;


}
