package com.docus.server.collection.validator;

import com.docus.infrastructure.web.api.ResultCode;
import lombok.Data;

/**
 * @author WYBDEV
 */
@Data
public class ValidateResult {
    /**
     * 验证结果代码
     */
    private ResultCode resultCode;
    /**
     * 验证结果信息
     */
    private String msg;
    public ValidateResult(ResultCode resultCode,String msg){
        this.resultCode=resultCode;
        this.msg=msg;
    }
    public static ValidateResult success(String msg){
        return new ValidateResult(ResultCode.SUCCESS,msg);
    }

    public static ValidateResult failed(String msg){
        return new ValidateResult(ResultCode.FAILED,msg);
    }
}
