package com.ecep.contract.model;

import java.util.Objects;

import com.ecep.contract.ContractFileType;
import com.ecep.contract.util.HibernateProxyUtils;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 合同文件类型（多国语言支持）
 */
@Getter
@Setter
@Entity
@Table(name = "CONTRACT_FILE_TYPE_LOCAL")
@ToString
public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> {
    /**
     * 建议的文件名
     */
    @Column(name = "SUGGEST_FILE_NAME")
    private String suggestFileName;

    @Override
    public final boolean equals(Object object) {
        if (this == object)
            return true;
        if (object == null)
            return false;
        if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
            return false;
        }
        ContractFileTypeLocal that = (ContractFileTypeLocal) object;
        return getId() != null && Objects.equals(getId(), that.getId());
    }

    @Override
    public final int hashCode() {
        return HibernateProxyUtils.hashCode(this);
    }
}
