package cn.com.qmth.examcloud.core.questions.service.bean;

import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
import cn.com.qmth.examcloud.examwork.api.bean.ExamCourseRelationBean;

public class CouresInfo implements JsonSerializable {

    private static final long serialVersionUID = 1487659956593385878L;

    private Long examId;

    private Long courseId;

    private String courseName;

    private String courseCode;

    private String courseLevel;

    private Boolean courseEnable;

    public CouresInfo() {
    }

    public CouresInfo(ExamCourseRelationBean bean) {
        this.examId = bean.getExamId();
        this.courseCode = bean.getCourseCode();
        this.courseId = bean.getCourseId();
        this.courseEnable = bean.getCourseEnable();
        this.courseName = bean.getCourseName();
    }

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public String getCourseLevel() {
        return courseLevel;
    }

    public void setCourseLevel(String courseLevel) {
        this.courseLevel = courseLevel;
    }

    public Boolean getCourseEnable() {
        return courseEnable;
    }

    public void setCourseEnable(Boolean courseEnable) {
        this.courseEnable = courseEnable;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result
                + ((courseCode == null) ? 0 : courseCode.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        CouresInfo other = (CouresInfo) obj;
        if (courseCode == null) {
            if (other.courseCode != null)
                return false;
        } else if (!courseCode.equals(other.courseCode))
            return false;
        return true;
    }

}
