package com.publiccms.entities.cms;
// Generated 2016-11-20 14:46:17 by Hibernate Tools 4.3.1

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

import org.hibernate.annotations.DynamicUpdate;

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

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

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private CmsDictionaryDataId id;
    /**
     * parent value<p>
     * 父节点值
     */
    @GeneratorColumn(title = "父值", condition = true)
    private String parentValue;
    /**
     * text<p>
     * 文本
     */
    @GeneratorColumn(title = "文字")
    private String text;
    /**
     * sort<p>
     * 排序
     */
    @GeneratorColumn(title = "排序")
    private int sort;

    public CmsDictionaryData() {
    }

    public CmsDictionaryData(CmsDictionaryDataId id, String text, int sort) {
        this.id = id;
        this.text = text;
        this.sort = sort;
    }

    @EmbeddedId

    @AttributeOverrides({
            @AttributeOverride(name = "dictionaryId", column = @Column(name = "dictionary_id", nullable = false, length = 20)),
            @AttributeOverride(name = "siteId", column = @Column(name = "site_id", nullable = false)),
            @AttributeOverride(name = "value", column = @Column(name = "value", nullable = false, length = 50)) })
    public CmsDictionaryDataId getId() {
        return this.id;
    }

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

    @Column(name = "parent_value", length = 50)
    public String getParentValue() {
        return this.parentValue;
    }

    public void setParentValue(String parentValue) {
        this.parentValue = parentValue;
    }

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

    public void setText(String text) {
        this.text = text;
    }

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

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