package cokr.xit.ens.modules.ktsigntalk.direct.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_kt_st_ott_his", schema = "", catalog = "", indexes = {
        @Index(name = "idx_snd_dtl_kt_st_ott_his_01", columnList = "regist_dt")
})
@Schema(name = "SendDetailKtSigntalkTokenHist")
public class SendDetailKtSigntalkTokenHist {

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

//    @Schema(required = false, title = "문서식별번호(외부)", example = " ")
//    @Column(name = "client_src_key", nullable = true)
//    private String clientSrcKey;

    @Schema(required = false, title = "문서식별번호(내부)", example = " ")
    @Column(name = "src_key", nullable = true)
    private String srcKey;

    @Schema(required = false, title = "원타임토큰(OTT)", example = " ")
    @Column(name = "token", nullable = true)
    private String token;

    @Schema(required = false, title = "등록일시", example = " ")
    @Column(name = "regist_dt", nullable = true)
    @CreationTimestamp
    private LocalDateTime registDt;

    @Embedded
    private FieldError error;


}
