package com.qxgmat.data.dao.entity;

import java.io.Serializable;
import javax.persistence.*;

@Table(name = "examination_struct")
public class ExaminationStruct implements Serializable {
    @Id
    @Column(name = "`id`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 中文名称
     */
    @Column(name = "`title_zh`")
    private String titleZh;

    /**
     * 英文名称
     */
    @Column(name = "`title_en`")
    private String titleEn;

    /**
     * 父级id
     */
    @Column(name = "`parent_id`")
    private Integer parentId;

    /**
     * 排序：从大到小
     */
    @Column(name = "`order`")
    private Integer order;

    /**
     * 层级：从1开始
     */
    @Column(name = "`level`")
    private Integer level;

    /**
     * 说明
     */
    @Column(name = "`description`")
    private String description;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取中文名称
     *
     * @return title_zh - 中文名称
     */
    public String getTitleZh() {
        return titleZh;
    }

    /**
     * 设置中文名称
     *
     * @param titleZh 中文名称
     */
    public void setTitleZh(String titleZh) {
        this.titleZh = titleZh;
    }

    /**
     * 获取英文名称
     *
     * @return title_en - 英文名称
     */
    public String getTitleEn() {
        return titleEn;
    }

    /**
     * 设置英文名称
     *
     * @param titleEn 英文名称
     */
    public void setTitleEn(String titleEn) {
        this.titleEn = titleEn;
    }

    /**
     * 获取父级id
     *
     * @return parent_id - 父级id
     */
    public Integer getParentId() {
        return parentId;
    }

    /**
     * 设置父级id
     *
     * @param parentId 父级id
     */
    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    /**
     * 获取排序：从大到小
     *
     * @return order - 排序：从大到小
     */
    public Integer getOrder() {
        return order;
    }

    /**
     * 设置排序：从大到小
     *
     * @param order 排序：从大到小
     */
    public void setOrder(Integer order) {
        this.order = order;
    }

    /**
     * 获取层级：从1开始
     *
     * @return level - 层级：从1开始
     */
    public Integer getLevel() {
        return level;
    }

    /**
     * 设置层级：从1开始
     *
     * @param level 层级：从1开始
     */
    public void setLevel(Integer level) {
        this.level = level;
    }

    /**
     * 获取说明
     *
     * @return description - 说明
     */
    public String getDescription() {
        return description;
    }

    /**
     * 设置说明
     *
     * @param description 说明
     */
    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", titleZh=").append(titleZh);
        sb.append(", titleEn=").append(titleEn);
        sb.append(", parentId=").append(parentId);
        sb.append(", order=").append(order);
        sb.append(", level=").append(level);
        sb.append(", description=").append(description);
        sb.append("]");
        return sb.toString();
    }

    public static ExaminationStruct.Builder builder() {
        return new ExaminationStruct.Builder();
    }

    public static class Builder {
        private ExaminationStruct obj;

        public Builder() {
            this.obj = new ExaminationStruct();
        }

        /**
         * @param id
         */
        public Builder id(Integer id) {
            obj.setId(id);
            return this;
        }

        /**
         * 设置中文名称
         *
         * @param titleZh 中文名称
         */
        public Builder titleZh(String titleZh) {
            obj.setTitleZh(titleZh);
            return this;
        }

        /**
         * 设置英文名称
         *
         * @param titleEn 英文名称
         */
        public Builder titleEn(String titleEn) {
            obj.setTitleEn(titleEn);
            return this;
        }

        /**
         * 设置父级id
         *
         * @param parentId 父级id
         */
        public Builder parentId(Integer parentId) {
            obj.setParentId(parentId);
            return this;
        }

        /**
         * 设置排序：从大到小
         *
         * @param order 排序：从大到小
         */
        public Builder order(Integer order) {
            obj.setOrder(order);
            return this;
        }

        /**
         * 设置层级：从1开始
         *
         * @param level 层级：从1开始
         */
        public Builder level(Integer level) {
            obj.setLevel(level);
            return this;
        }

        /**
         * 设置说明
         *
         * @param description 说明
         */
        public Builder description(String description) {
            obj.setDescription(description);
            return this;
        }

        public ExaminationStruct build() {
            return this.obj;
        }
    }
}