package cn.com.qmth.stmms.biz.mark.model;

/**
 * 评卷提交结果状态
 */
public class SubmitResult {

    private boolean success;

    private MarkLibrary markLibrary;

    private TrialLibrary trialLibrary;

    public static SubmitResult faile() {
        return new SubmitResult(false, null, null);
    }

    public static SubmitResult success(MarkLibrary library) {
        return new SubmitResult(true, library, null);
    }

    public static SubmitResult success(TrialLibrary library) {
        return new SubmitResult(true, null, library);
    }

    private SubmitResult(boolean success, MarkLibrary markLibrary, TrialLibrary trialLibrary) {
        this.success = success;
        this.markLibrary = markLibrary;
        this.trialLibrary = trialLibrary;
    }

    public boolean isSuccess() {
        return success;
    }

    public MarkLibrary getMarkLibrary() {
        return markLibrary;
    }

    public TrialLibrary getTrialLibrary() {
        return trialLibrary;
    }

}
