package cn.com.qmth.stmms.admin.vo;

import cn.com.qmth.stmms.biz.exam.model.MarkLevel;

public class MarkLevelVO {

    private String name;

    private double min;

    private double max;

    public static MarkLevelVO parse(MarkLevel level) {
        MarkLevelVO vo = new MarkLevelVO();
        if (level != null) {
            vo.setName(level.getName());
            vo.setMax(level.getMax() != null ? level.getMax() : 0);
            vo.setMin(level.getMin() != null ? level.getMin() : 0);
        }
        return vo;
    }

    public MarkLevel transform() {
        MarkLevel level = new MarkLevel();
        level.setName(name);
        level.setMax(max);
        level.setMin(min);
        return level;
    }

    public String getName() {
        return name;
    }

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

    public double getMin() {
        return min;
    }

    public void setMin(double min) {
        this.min = min;
    }

    public double getMax() {
        return max;
    }

    public void setMax(double max) {
        this.max = max;
    }
}
