package com.qxgmat.data.dao.entity; import java.io.Serializable; import javax.persistence.*; @Table(name = "exercise_struct") public class ExerciseStruct 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 = "`sort`") private Integer sort; /** * 层级:从1开始 */ @Column(name = "`level`") private Integer level; /** * 提问状态:0关闭,1开启 */ @Column(name = "`question_status`") private Integer questionStatus; /** * 是否是课程 */ @Column(name = "`is_course`") private Integer isCourse; /** * 是否是资料 */ @Column(name = "`is_data`") private Integer isData; /** * 是否是长难句:每一层都继承 */ @Column(name = "`is_sentence`") private Integer isSentence; /** * 是否是考试:每一层都继承 */ @Column(name = "`is_examination`") private Integer isExamination; @Column(name = "`extend`") private String extend; /** * 描述 */ @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 sort - 排序:从大到小 */ public Integer getSort() { return sort; } /** * 设置排序:从大到小 * * @param sort 排序:从大到小 */ public void setSort(Integer sort) { this.sort = sort; } /** * 获取层级:从1开始 * * @return level - 层级:从1开始 */ public Integer getLevel() { return level; } /** * 设置层级:从1开始 * * @param level 层级:从1开始 */ public void setLevel(Integer level) { this.level = level; } /** * 获取提问状态:0关闭,1开启 * * @return question_status - 提问状态:0关闭,1开启 */ public Integer getQuestionStatus() { return questionStatus; } /** * 设置提问状态:0关闭,1开启 * * @param questionStatus 提问状态:0关闭,1开启 */ public void setQuestionStatus(Integer questionStatus) { this.questionStatus = questionStatus; } /** * 获取是否是课程 * * @return is_course - 是否是课程 */ public Integer getIsCourse() { return isCourse; } /** * 设置是否是课程 * * @param isCourse 是否是课程 */ public void setIsCourse(Integer isCourse) { this.isCourse = isCourse; } /** * 获取是否是资料 * * @return is_data - 是否是资料 */ public Integer getIsData() { return isData; } /** * 设置是否是资料 * * @param isData 是否是资料 */ public void setIsData(Integer isData) { this.isData = isData; } /** * 获取是否是长难句:每一层都继承 * * @return is_sentence - 是否是长难句:每一层都继承 */ public Integer getIsSentence() { return isSentence; } /** * 设置是否是长难句:每一层都继承 * * @param isSentence 是否是长难句:每一层都继承 */ public void setIsSentence(Integer isSentence) { this.isSentence = isSentence; } /** * 获取是否是考试:每一层都继承 * * @return is_examination - 是否是考试:每一层都继承 */ public Integer getIsExamination() { return isExamination; } /** * 设置是否是考试:每一层都继承 * * @param isExamination 是否是考试:每一层都继承 */ public void setIsExamination(Integer isExamination) { this.isExamination = isExamination; } /** * @return extend */ public String getExtend() { return extend; } /** * @param extend */ public void setExtend(String extend) { this.extend = extend; } /** * 获取描述 * * @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(", sort=").append(sort); sb.append(", level=").append(level); sb.append(", questionStatus=").append(questionStatus); sb.append(", isCourse=").append(isCourse); sb.append(", isData=").append(isData); sb.append(", isSentence=").append(isSentence); sb.append(", isExamination=").append(isExamination); sb.append(", extend=").append(extend); sb.append(", description=").append(description); sb.append("]"); return sb.toString(); } public static ExerciseStruct.Builder builder() { return new ExerciseStruct.Builder(); } public static class Builder { private ExerciseStruct obj; public Builder() { this.obj = new ExerciseStruct(); } /** * @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 sort 排序:从大到小 */ public Builder sort(Integer sort) { obj.setSort(sort); return this; } /** * 设置层级:从1开始 * * @param level 层级:从1开始 */ public Builder level(Integer level) { obj.setLevel(level); return this; } /** * 设置提问状态:0关闭,1开启 * * @param questionStatus 提问状态:0关闭,1开启 */ public Builder questionStatus(Integer questionStatus) { obj.setQuestionStatus(questionStatus); return this; } /** * 设置是否是课程 * * @param isCourse 是否是课程 */ public Builder isCourse(Integer isCourse) { obj.setIsCourse(isCourse); return this; } /** * 设置是否是资料 * * @param isData 是否是资料 */ public Builder isData(Integer isData) { obj.setIsData(isData); return this; } /** * 设置是否是长难句:每一层都继承 * * @param isSentence 是否是长难句:每一层都继承 */ public Builder isSentence(Integer isSentence) { obj.setIsSentence(isSentence); return this; } /** * 设置是否是考试:每一层都继承 * * @param isExamination 是否是考试:每一层都继承 */ public Builder isExamination(Integer isExamination) { obj.setIsExamination(isExamination); return this; } /** * @param extend */ public Builder extend(String extend) { obj.setExtend(extend); return this; } /** * 设置描述 * * @param description 描述 */ public Builder description(String description) { obj.setDescription(description); return this; } public ExerciseStruct build() { return this.obj; } } }