package cn.axzo.workflow.common.code;

import cn.axzo.framework.domain.web.code.IModuleRespCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 表单实例相关响应码
 *
 * @author wangli
 * @since 2024-11-13 14:34
 */
@Getter
@AllArgsConstructor
public enum FormInstanceRespCode implements IModuleRespCode {
    FORM_PARAM_ERROR("001", "流程实例 ID 和任务 ID 不能都为空"),
    FORM_FIELD_NOT_FOUND("002", "无法获取全量表单字段权限配置信息"),
    FORM_FIELD_VALIDATOR_ERROR("003", "表单字段校验不通过"),
    FORM_INSTANCE_PARSE_ERROR("004", "表单实例数据解析错误"),
    FORM_INSTANCE_DATA_NOT_FOUND("005", "未找到指定实例【{}】的表单数据"),
    FORM_DATA_PARSE_ERROR("006", "表单数据解析异常"),
    FORM_DATA_PARSE_ERROR_BY_UPLOAD("007", "表单上传组件的数据解析异常"),
    FORM_DATA_PARSE_ERROR_BY_IMAGE("008", "表单图片组件的数据解析异常"),
    FORM_DATA_PARSE_ERROR_BY_CUSTOM_COMPONENT("009", "表单自定义组件的数据解析异常"),
    FORM_DATA_PARSE_ERROR_BY_AMOUNT("010", "表单金额组件的数据解析异常"),
    ;

    private final String code;
    private final String message;

    @Override
    public String getModuleCode() {
        return "13";
    }

    @Override
    public String getProjectCode() {
        return "998";
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }


}
