package com.publiccms.entities.cms;
// Generated 2026-1-4 13:40:55 by Hibernate Tools 5.6.15.Final

import javax.persistence.Column;
import javax.persistence.Embeddable;

import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * CmsContentLangId generated by hbm2java
 */
@Embeddable
public class CmsContentLangId implements java.io.Serializable {

    private static final long serialVersionUID = 1L;
    @GeneratorColumn(title = "内容")
    private long contentId;
    @GeneratorColumn(title = "语言")
    private String lang;

    public CmsContentLangId() {
    }

    public CmsContentLangId(long contentId, String lang) {
        this.contentId = contentId;
        this.lang = lang;
    }

    @Column(name = "content_id", nullable = false)
    public long getContentId() {
        return this.contentId;
    }

    public void setContentId(long contentId) {
        this.contentId = contentId;
    }

    @Column(name = "lang", nullable = false, length = 50)
    public String getLang() {
        return this.lang;
    }

    public void setLang(String lang) {
        this.lang = lang;
    }

    public boolean equals(Object other) {
        if ((this == other))
            return true;
        if ((other == null))
            return false;
        if (!(other instanceof CmsContentLangId))
            return false;
        CmsContentLangId castOther = (CmsContentLangId) other;

        return (this.getContentId() == castOther.getContentId()) && ((this.getLang() == castOther.getLang())
                || (this.getLang() != null && castOther.getLang() != null && this.getLang().equals(castOther.getLang())));
    }

    public int hashCode() {
        int result = 17;

        result = 37 * result + (int) this.getContentId();
        result = 37 * result + (getLang() == null ? 0 : this.getLang().hashCode());
        return result;
    }

}
