|
@@ -1,120 +1,107 @@
|
|
|
package cn.com.qmth.examcloud.core.questions.dao.entity;
|
|
|
|
|
|
-import java.io.Serializable;
|
|
|
+import cn.com.qmth.examcloud.core.questions.dao.entity.dto.CoursePropertyDto;
|
|
|
|
|
|
import javax.persistence.Entity;
|
|
|
-import javax.persistence.GeneratedValue;
|
|
|
-import javax.persistence.Id;
|
|
|
import javax.persistence.Table;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.dao.entity.dto.CoursePropertyDto;
|
|
|
-
|
|
|
/**
|
|
|
- * @describle 课程属性
|
|
|
* @author weiwenhai
|
|
|
- * @date 2017.11.2
|
|
|
+ * @describle 课程属性
|
|
|
+ * @date 2017.11.2
|
|
|
*/
|
|
|
@Entity
|
|
|
-@Table(name ="ecs_ques_course_property")
|
|
|
-public class CourseProperty implements Serializable{
|
|
|
-
|
|
|
- private static final long serialVersionUID = 3370756666063937765L;
|
|
|
-
|
|
|
- @Id
|
|
|
- @GeneratedValue
|
|
|
- private Long id;
|
|
|
-
|
|
|
- @NotNull
|
|
|
- private String name;
|
|
|
-
|
|
|
- @NotNull
|
|
|
- private Long courseId;
|
|
|
-
|
|
|
- @NotNull
|
|
|
- private Long orgId;
|
|
|
-
|
|
|
- private String courseCode;
|
|
|
-
|
|
|
- private Boolean enable;
|
|
|
-
|
|
|
- private String courseName;
|
|
|
-
|
|
|
- public CourseProperty(){}
|
|
|
-
|
|
|
- public CourseProperty(CoursePropertyDto coursePropertyDto){
|
|
|
- this.id = coursePropertyDto.getId();
|
|
|
- this.name = coursePropertyDto.getName();
|
|
|
- this.courseId = coursePropertyDto.getCourseId();
|
|
|
- this.orgId = coursePropertyDto.getOrgId();
|
|
|
- this.courseCode = coursePropertyDto.getCourseCode();
|
|
|
- if(coursePropertyDto.getEnable() != null && coursePropertyDto.getEnable().equals("0")){
|
|
|
- this.enable = false;
|
|
|
- }else if(coursePropertyDto.getEnable() != null && coursePropertyDto.getEnable().equals("1")){
|
|
|
- this.enable = true;
|
|
|
- }else {
|
|
|
- this.enable = null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public Long getId() {
|
|
|
- return id;
|
|
|
- }
|
|
|
-
|
|
|
- public void setId(Long id) {
|
|
|
- this.id = id;
|
|
|
- }
|
|
|
-
|
|
|
- public String getName() {
|
|
|
- return name;
|
|
|
- }
|
|
|
-
|
|
|
- public void setName(String name) {
|
|
|
- this.name = name;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getCourseId() {
|
|
|
- return courseId;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCourseId(Long courseId) {
|
|
|
- this.courseId = courseId;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getOrgId() {
|
|
|
- return orgId;
|
|
|
- }
|
|
|
-
|
|
|
- public void setOrgId(Long orgId) {
|
|
|
- this.orgId = orgId;
|
|
|
- }
|
|
|
-
|
|
|
- public static long getSerialversionuid() {
|
|
|
- return serialVersionUID;
|
|
|
- }
|
|
|
-
|
|
|
- public Boolean getEnable() {
|
|
|
- return enable;
|
|
|
- }
|
|
|
-
|
|
|
- public void setEnable(Boolean enable) {
|
|
|
- this.enable = enable;
|
|
|
- }
|
|
|
-
|
|
|
- public String getCourseCode() {
|
|
|
- return courseCode;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCourseCode(String courseCode) {
|
|
|
- this.courseCode = courseCode;
|
|
|
- }
|
|
|
-
|
|
|
- public String getCourseName() {
|
|
|
- return courseName;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCourseName(String courseName) {
|
|
|
- this.courseName = courseName;
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
+@Table(name = "ecs_ques_course_property")
|
|
|
+public class CourseProperty extends IdEntity {
|
|
|
+ @NotNull
|
|
|
+ private String name;
|
|
|
+
|
|
|
+ @NotNull
|
|
|
+ private Long courseId;
|
|
|
+
|
|
|
+ @NotNull
|
|
|
+ private Long orgId;
|
|
|
+
|
|
|
+ private String courseCode;
|
|
|
+
|
|
|
+ private Boolean enable;
|
|
|
+
|
|
|
+ private String courseName;
|
|
|
+
|
|
|
+ public CourseProperty() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public CourseProperty(CoursePropertyDto coursePropertyDto) {
|
|
|
+ this.id = coursePropertyDto.getId();
|
|
|
+ this.name = coursePropertyDto.getName();
|
|
|
+ this.courseId = coursePropertyDto.getCourseId();
|
|
|
+ this.orgId = coursePropertyDto.getOrgId();
|
|
|
+ this.courseCode = coursePropertyDto.getCourseCode();
|
|
|
+ if (coursePropertyDto.getEnable() != null && coursePropertyDto.getEnable().equals("0")) {
|
|
|
+ this.enable = false;
|
|
|
+ } else if (coursePropertyDto.getEnable() != null && coursePropertyDto.getEnable().equals("1")) {
|
|
|
+ this.enable = true;
|
|
|
+ } else {
|
|
|
+ this.enable = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getId() {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setId(Long id) {
|
|
|
+ this.id = id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName() {
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setName(String name) {
|
|
|
+ this.name = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getCourseId() {
|
|
|
+ return courseId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCourseId(Long courseId) {
|
|
|
+ this.courseId = courseId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getOrgId() {
|
|
|
+ return orgId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOrgId(Long orgId) {
|
|
|
+ this.orgId = orgId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Boolean getEnable() {
|
|
|
+ return enable;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEnable(Boolean enable) {
|
|
|
+ this.enable = enable;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCourseCode() {
|
|
|
+ return courseCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCourseCode(String courseCode) {
|
|
|
+ this.courseCode = courseCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCourseName() {
|
|
|
+ return courseName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCourseName(String courseName) {
|
|
|
+ this.courseName = courseName;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|