|
@@ -0,0 +1,230 @@
|
|
|
+package com.qxgmat.data.dao.entity;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+import java.util.Date;
|
|
|
+import javax.persistence.*;
|
|
|
+
|
|
|
+@Table(name = "course")
|
|
|
+public class Course implements Serializable {
|
|
|
+ @Id
|
|
|
+ @Column(name = "`id`")
|
|
|
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
+ private Integer id;
|
|
|
+
|
|
|
+
|
|
|
+ * 节点id
|
|
|
+ */
|
|
|
+ @Column(name = "`struct_id`")
|
|
|
+ private Integer structId;
|
|
|
+
|
|
|
+
|
|
|
+ * 上级节点id,0为无上级
|
|
|
+ */
|
|
|
+ @Column(name = "`parent_struct_id`")
|
|
|
+ private Integer parentStructId;
|
|
|
+
|
|
|
+
|
|
|
+ * 题型:从struct上获取extend
|
|
|
+ */
|
|
|
+ @Column(name = "`question_type`")
|
|
|
+ private String questionType;
|
|
|
+
|
|
|
+
|
|
|
+ * 课程名称
|
|
|
+ */
|
|
|
+ @Column(name = "`title`")
|
|
|
+ private String title;
|
|
|
+
|
|
|
+ @Column(name = "`create_time`")
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+
|
|
|
+ * @return id
|
|
|
+ */
|
|
|
+ public Integer getId() {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * @param id
|
|
|
+ */
|
|
|
+ public void setId(Integer id) {
|
|
|
+ this.id = id;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 获取节点id
|
|
|
+ *
|
|
|
+ * @return struct_id - 节点id
|
|
|
+ */
|
|
|
+ public Integer getStructId() {
|
|
|
+ return structId;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置节点id
|
|
|
+ *
|
|
|
+ * @param structId 节点id
|
|
|
+ */
|
|
|
+ public void setStructId(Integer structId) {
|
|
|
+ this.structId = structId;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 获取上级节点id,0为无上级
|
|
|
+ *
|
|
|
+ * @return parent_struct_id - 上级节点id,0为无上级
|
|
|
+ */
|
|
|
+ public Integer getParentStructId() {
|
|
|
+ return parentStructId;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置上级节点id,0为无上级
|
|
|
+ *
|
|
|
+ * @param parentStructId 上级节点id,0为无上级
|
|
|
+ */
|
|
|
+ public void setParentStructId(Integer parentStructId) {
|
|
|
+ this.parentStructId = parentStructId;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 获取题型:从struct上获取extend
|
|
|
+ *
|
|
|
+ * @return question_type - 题型:从struct上获取extend
|
|
|
+ */
|
|
|
+ public String getQuestionType() {
|
|
|
+ return questionType;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置题型:从struct上获取extend
|
|
|
+ *
|
|
|
+ * @param questionType 题型:从struct上获取extend
|
|
|
+ */
|
|
|
+ public void setQuestionType(String questionType) {
|
|
|
+ this.questionType = questionType;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 获取课程名称
|
|
|
+ *
|
|
|
+ * @return title - 课程名称
|
|
|
+ */
|
|
|
+ public String getTitle() {
|
|
|
+ return title;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置课程名称
|
|
|
+ *
|
|
|
+ * @param title 课程名称
|
|
|
+ */
|
|
|
+ public void setTitle(String title) {
|
|
|
+ this.title = title;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * @return create_time
|
|
|
+ */
|
|
|
+ public Date getCreateTime() {
|
|
|
+ return createTime;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * @param createTime
|
|
|
+ */
|
|
|
+ public void setCreateTime(Date createTime) {
|
|
|
+ this.createTime = createTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ @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(", structId=").append(structId);
|
|
|
+ sb.append(", parentStructId=").append(parentStructId);
|
|
|
+ sb.append(", questionType=").append(questionType);
|
|
|
+ sb.append(", title=").append(title);
|
|
|
+ sb.append(", createTime=").append(createTime);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Course.Builder builder() {
|
|
|
+ return new Course.Builder();
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class Builder {
|
|
|
+ private Course obj;
|
|
|
+
|
|
|
+ public Builder() {
|
|
|
+ this.obj = new Course();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * @param id
|
|
|
+ */
|
|
|
+ public Builder id(Integer id) {
|
|
|
+ obj.setId(id);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置节点id
|
|
|
+ *
|
|
|
+ * @param structId 节点id
|
|
|
+ */
|
|
|
+ public Builder structId(Integer structId) {
|
|
|
+ obj.setStructId(structId);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置上级节点id,0为无上级
|
|
|
+ *
|
|
|
+ * @param parentStructId 上级节点id,0为无上级
|
|
|
+ */
|
|
|
+ public Builder parentStructId(Integer parentStructId) {
|
|
|
+ obj.setParentStructId(parentStructId);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置题型:从struct上获取extend
|
|
|
+ *
|
|
|
+ * @param questionType 题型:从struct上获取extend
|
|
|
+ */
|
|
|
+ public Builder questionType(String questionType) {
|
|
|
+ obj.setQuestionType(questionType);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 设置课程名称
|
|
|
+ *
|
|
|
+ * @param title 课程名称
|
|
|
+ */
|
|
|
+ public Builder title(String title) {
|
|
|
+ obj.setTitle(title);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * @param createTime
|
|
|
+ */
|
|
|
+ public Builder createTime(Date createTime) {
|
|
|
+ obj.setCreateTime(createTime);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Course build() {
|
|
|
+ return this.obj;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|