package cokr.xit.ens.modules.common.ctgy.sys.mng.domain;

import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.ids.TmpltMngIds;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

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

@Entity
//@Data
@Getter
@ToString
//@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ens_tmplt_mng", schema = "", catalog = "")
@IdClass(TmpltMngIds.class)
@SuperBuilder
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "dtype")
@DiscriminatorValue("basic")
public class TmpltMng {

//    @Id
//    @Column(name = "org_cd", nullable = false, length = 20)
//    private String orgCd;
    
    @Column(length = 10, insertable = false, updatable = false)
    private String dtype;
    @Id
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "org_cd")
    @Setter
    private OrgMng orgMng;

    @Id
    @Column(name = "tmplt_cd", nullable = false, length = 30)
    private String tmpltCd;

    
    @Column(name = "title", nullable = false, length = 40)
    @Setter
    private String title;

    
    @Column(name = "message", nullable = false, length = 2000)
    @Setter
    private String message;


//    @Column(name = "cs_number", nullable = true, length = 20)
//    @Setter
//    private String csNumber;
//

//    @Column(name = "cs_name", nullable = true, length = 10)
//    @Setter
//    private String csName;

    
    @Column(name = "use_yn", nullable = false, length = 1)
    @Setter
    private String useYn;

    
    @Column(name = "regist_id", nullable = true)
    @Setter
    private String registId;

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

    
    @Column(name = "upd_id", nullable = true)
    @Setter
    private String updId;

    
    @Column(name = "last_updt_dt", nullable = true)
    @UpdateTimestamp
    private LocalDateTime lastUpdtDt;






//    @Column(name = "ci_send_yn", nullable = true)
//    private String ciSendYn;

//    @Column(name = "div_send_cnt", nullable = true)
//    private Long divSendCnt;

//    @Column(name = "div_send_min", nullable = true)
//    private Long divSendMin;

//    @Column(name = "send_thread_cnt", nullable = true)
//    private Long sendThreadCnt;

//    @Column(name = "fail_resend_cnt", nullable = true)
//    private Long failResendCnt;

//    @Column(name = "fail_resend_min", nullable = true)
//    private Long failResendMin;

//    @Column(name = "tmot_api_use_yn", nullable = true)
//    private String tmotApiUseYn;

//    @Column(name = "pce_doc_reg_yn", nullable = true)
//    private String pceDocRegYn;

//    @Column(name = "access_token_use_yn", nullable = true)
//    private String accessTokenUseYn;

//    @Column(name = "access_token", nullable = true)
//    private String accessToken;

//    @Column(name = "service_cd", nullable = true)
//    private String serviceCd;

//    @Column(name = "service_key", nullable = true)
//    private String serviceKey;

//    @Column(name = "tx_prefix", nullable = true)
//    private String txPrefix;

//    @Column(name = "verify_auth_name", nullable = true)
//    private String verifyAuthName;

//    @Column(name = "allow_simple_reg_yn", nullable = true)
//    private String allowSimpleRegYn;

//    @Column(name = "msg_cd", nullable = true)
//    private String msgCd;

//    @Column(name = "nv_client_id", nullable = true)
//    private String nvClientId;

//    @Column(name = "nv_client_secret", nullable = true)
//    private String nvClientSecret;

//    @Column(name = "h_local_gov", nullable = true)
//    private String hLocalGov;

//    @Column(name = "h_dept", nullable = true)
//    private String hDept;

//    @Column(name = "h_info_name", nullable = true)
//    private String hInfoName;


}
