package cn.com.qmth.examcloud.core.questions.dao.entity;

import cn.com.qmth.examcloud.core.questions.dao.entity.base.IdBase;

public class QuesProperty extends IdBase {

    private String coursePropertyName;//课程属性名

    private Property firstProperty;//一级属性

    private Property secondProperty;//二级属性

    public QuesProperty() {

    }

    public QuesProperty(Property firstProperty, Property secondProperty, CourseProperty courseProperty) {
        this.firstProperty = firstProperty;
        this.secondProperty = secondProperty;
        this.coursePropertyName = courseProperty.getName();
    }

    public Property getFirstProperty() {
        return firstProperty;
    }

    public void setFirstProperty(Property firstProperty) {
        this.firstProperty = firstProperty;
    }

    public Property getSecondProperty() {
        return secondProperty;
    }

    public void setSecondProperty(Property secondProperty) {
        this.secondProperty = secondProperty;
    }

    public String getCoursePropertyName() {
        return coursePropertyName;
    }

    public void setCoursePropertyName(String coursePropertyName) {
        this.coursePropertyName = coursePropertyName;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.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;
        QuesProperty other = (QuesProperty) obj;
        if (id == null) {
            if (other.id != null)
                return false;
        } else if (!id.equals(other.id))
            return false;
        return true;
    }

}
