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

import java.util.*;

import javax.persistence.*;

import org.hibernate.proxy.*;

import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.*;
import lombok.*;
import lombok.experimental.*;

@Entity
@Getter
@ToString
@SuperBuilder
@NoArgsConstructor
@Table(name = "ens_tmplt_mng_kko_talk")
@DiscriminatorValue("kkotalk")
public class TmpltMngKkoTalk extends TmpltMng {


    @Column(name = "pryMessage", nullable = true, length = 2000)
    @Setter
    private String pryMessage;


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


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


    @Column(name = "ci_trans_use_yn", nullable = false, length = 1)
    private String ciTransUseYn;


    @Column(name = "tmplt_msg_use_yn", nullable = false, length = 1)
    private String tmpltMsgUseYn;


    @Column(name = "tmplt_cs_info_use_yn", nullable = false, length = 1)
    private String tmpltCsInfoUseYn;

    @Override
    public final boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null)
            return false;
        Class<?> oEffectiveClass = o instanceof HibernateProxy ?
            ((HibernateProxy)o).getHibernateLazyInitializer().getPersistentClass() : o.getClass();
        Class<?> thisEffectiveClass = this instanceof HibernateProxy ?
            ((HibernateProxy)this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
        if (thisEffectiveClass != oEffectiveClass)
            return false;
        TmpltMngKkoTalk that = (TmpltMngKkoTalk)o;
        return getOrgMng() != null && Objects.equals(getOrgMng(), that.getOrgMng());
    }

    @Override
    public final int hashCode() {
        return this instanceof HibernateProxy ?
            ((HibernateProxy)this).getHibernateLazyInitializer().getPersistentClass().hashCode() :
            getClass().hashCode();
    }
}
