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

import java.time.*;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.*;

import org.hibernate.annotations.*;

import cokr.xit.ens.modules.common.domain.support.*;
import lombok.*;

@Entity
@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ens_snd_dtl_kko_talk_ott_his", indexes = {
        @Index(name = "idx_snd_dtl_kko_talk_ott_his_01", columnList = "regist_dt")
})
public class SendDetailKkoTalkTokenHist {

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


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


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


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


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


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


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


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


    @Column(name = "user_notified_at", nullable = true)
    private String 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;


}
