package cn.com.qmth.stmms.biz.exam.query;

import cn.com.qmth.stmms.biz.common.BaseQuery;
import cn.com.qmth.stmms.biz.exam.model.Exam;
import cn.com.qmth.stmms.common.enums.ExamStatus;
import cn.com.qmth.stmms.common.enums.ExamType;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;

public class ExamSearchQuery extends BaseQuery<Exam> {

    private Integer id;

    private String name;

    private String code;

    private Integer schoolId;

    private ExamStatus status;

    private ExamType type;

    public void orderByIdDesc() {
        setSort(new Sort(Direction.DESC, "id"));
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Integer schoolId) {
        this.schoolId = schoolId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public ExamStatus getStatus() {
        return status;
    }

    public void setStatus(ExamStatus status) {
        this.status = status;
    }

    public ExamType getType() {
        return type;
    }

    public void setType(ExamType type) {
        this.type = type;
    }
}
