package cokr.xit.ens.modules.common.ctgy.nicedici.support.rest.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.time.LocalDateTime;

@Entity
@Getter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ens_nice_ci_symkey_mng", schema = "", catalog = "", indexes = {
        @Index(name = "idx_nice_ci_symkey_mng_01", columnList = "client_id"),
})
@Schema(name = "NiceCiSymkeyMng")
public class NiceCiSymkeyMng {


    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long niceCiSymkeyMngId;         

    @Schema(required = true, title = "(계약정보)클라이언트ID", example = " ")
    @Column(name = "client_id", nullable = false, length = 255)
    private String clientId;

    @Schema(required = true, title = "공개키(PK)", example = " ")
    @Column(name = "pubkey", nullable = false, length = 1000)
    private String pubkey;

    @Schema(required = true, title = "대칭키", example = " ")
    @Column(name = "symkey", nullable = false, length = 32)
    private String symkey;

    @Schema(required = false, title = "만료일시", example = " ")
    @Column(name = "expire_dt", nullable = true, length = 14)
    private String expireDt;

    @Schema(required = false, title = "버전", example = " ")
    @Column(name = "version", nullable = true, length = 50)
    private String version;

    @Schema(required = true, title = "Initial Vector 값", example = " ")
    @Column(name = "iv", nullable = false, length = 16)
    private String iv;

    @Schema(required = true, title = "hmac key", example = " ")
    @Column(name = "hmac_key", nullable = false, length = 32)
    private String hmacKey;

    @Schema(required = true, title = "대체키등록API 응답 Json 데이터", example = " ")
    @Column(name = "resp_json_data", nullable = false, length = 1000)
    private String respJsonData;


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

    @Schema(required = false, title = "최종 수정일시", example = " ")
    @Column(name = "last_updt_dt", nullable = true)
    @UpdateTimestamp
    private LocalDateTime lastUpdtDt;


}
