package com.publiccms.entities.cms;
// Generated 2026-01-04 14:46:17 by Hibernate Tools 5.6.15.Final

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.Length;

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

/**
 * CmsLanguage generated by hbm2java
 */
@Entity
@Table(name = "cms_language")
@DynamicUpdate
public class CmsLanguage implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private CmsLanguageId id;
    /**
     * text
     * <p>
     * 文本
     */
    @GeneratorColumn(title = "名称")
    @Length(max = 100)
    private String name;
    /**
     * text
     * <p>
     * 文本
     */
    @GeneratorColumn(title = "封面图")
    @Length(max = 255)
    private String cover;
    /**
     * sort
     * <p>
     * 排序
     */
    @GeneratorColumn(title = "排序")
    private int sort;

    public CmsLanguage() {
    }

    public CmsLanguage(CmsLanguageId id, String name, String cover, int sort) {
        this.id = id;
        this.name = name;
        this.cover = cover;
        this.sort = sort;
    }

    @EmbeddedId
    @AttributeOverrides({ @AttributeOverride(name = "code", column = @Column(name = "code", nullable = false, length = 20)),
            @AttributeOverride(name = "siteId", column = @Column(name = "site_id", nullable = false)) })
    public CmsLanguageId getId() {
        return this.id;
    }

    public void setId(CmsLanguageId id) {
        this.id = id;
    }

    @Column(name = "name", nullable = false, length = 100)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "cover", length = 255)
    public String getCover() {
        return this.cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    @Column(name = "sort", nullable = false)
    public int getSort() {
        return this.sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }
}
