package com.yhy.module.core.enums;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * YHY Core 错误码枚举类
 *
 * yhy-core 模块，使用 1-010-000-000 段
 */
public interface ErrorCodeConstants {

    // ========== 工料机类别模块 1-010-001-000 ==========
    ErrorCode RESOURCE_CATEGORY_NOT_EXISTS = new ErrorCode(1_010_001_000, "工料机类别不存在");
    ErrorCode RESOURCE_CATEGORY_CODE_DUPLICATE = new ErrorCode(1_010_001_001, "已经存在代码为【{}】的工料机类别");
    ErrorCode RESOURCE_CATEGORY_HAS_ITEMS = new ErrorCode(1_010_001_002, "该类别下存在工料机项，无法删除");

    // ========== 资源库模块 1-010-002-000 ==========
    ErrorCode RESOURCE_CATALOG_NOT_EXISTS = new ErrorCode(1_010_002_000, "资源库不存在");
    
    // ========== 工料机项模块 1-010-003-000 ==========
    ErrorCode RESOURCE_ITEM_NOT_EXISTS = new ErrorCode(1_010_003_000, "工料机项不存在");

    // ========== 工料机机类树模块 1-010-004-000 ==========
    ErrorCode RESOURCE_CATEGORY_TREE_NOT_EXISTS = new ErrorCode(1_010_004_000, "工料机机类树节点不存在");
    ErrorCode RESOURCE_CATEGORY_TREE_NOT_TYPE = new ErrorCode(1_010_004_001, "该节点不是工程类型节点");

    // ========== 定额目录模块 1-010-005-000 ==========
    ErrorCode QUOTA_CATALOG_ITEM_NOT_EXISTS = new ErrorCode(1_010_005_000, "定额目录条目不存在");
    ErrorCode QUOTA_CATALOG_ITEM_HAS_CHILDREN = new ErrorCode(1_010_005_001, "该节点存在子节点，无法删除");
    ErrorCode QUOTA_CATALOG_ITEM_NOT_SPECIALTY = new ErrorCode(1_010_005_002, "该节点不是定额专业节点");
    ErrorCode QUOTA_CATALOG_ITEM_ALREADY_BOUND = new ErrorCode(1_010_005_003, "该定额专业已绑定工料机专业，不可修改");
    ErrorCode QUOTA_CATALOG_ITEM_CONTENT_NO_CHILDREN = new ErrorCode(1_010_005_004, "内容节点不允许添加子节点");
    ErrorCode QUOTA_CATALOG_ITEM_CONTENT_NEED_PARENT = new ErrorCode(1_010_005_005, "内容节点必须有父节点");
    ErrorCode QUOTA_CATALOG_ITEM_PARENT_NOT_DIRECTORY = new ErrorCode(1_010_005_006, "父节点必须是目录节点");
    ErrorCode QUOTA_CATALOG_ITEM_TYPE_MISMATCH = new ErrorCode(1_010_005_007, "节点类型不匹配");

    // ========== 定额子目模块 1-010-006-000 ==========
    ErrorCode QUOTA_ITEM_NOT_EXISTS = new ErrorCode(1_010_006_000, "定额子目不存在");
    ErrorCode QUOTA_ITEM_HAS_RESOURCES = new ErrorCode(1_010_006_001, "该定额子目存在工料机组成，无法删除");
    ErrorCode QUOTA_CATALOG_ITEM_NOT_CONTENT = new ErrorCode(1_010_006_002, "只有内容节点才能添加定额子目");
    ErrorCode QUOTA_SPECIALTY_NOT_BOUND = new ErrorCode(1_010_006_003, "定额专业尚未绑定工料机专业");
    ErrorCode QUOTA_SPECIALTY_NOT_FOUND = new ErrorCode(1_010_006_004, "未找到定额专业节点");

    // ========== 定额工料机组成模块 1-010-007-000 ==========
    ErrorCode QUOTA_RESOURCE_NOT_EXISTS = new ErrorCode(1_010_007_000, "定额工料机组成不存在");
    ErrorCode QUOTA_RESOURCE_OUT_OF_SCOPE = new ErrorCode(1_010_007_001, "该工料机不在定额专业的数据范围内");
    ErrorCode RESOURCE_CATALOG_ITEM_NOT_EXISTS = new ErrorCode(1_010_007_002, "工料机目录条目不存在");

    // ========== 定额费率项模块 1-010-008-000 ==========
    ErrorCode QUOTA_RATE_ITEM_NOT_EXISTS = new ErrorCode(1_010_008_000, "定额费率项不存在");
    ErrorCode QUOTA_RATE_ITEM_HAS_CHILDREN = new ErrorCode(1_010_008_001, "该费率项存在子节点，无法删除");
    ErrorCode QUOTA_RATE_ITEM_LEVEL_EXCEED = new ErrorCode(1_010_008_002, "费率项层级不能超过3级");
    ErrorCode QUOTA_RATE_ITEM_NOT_SAME_LEVEL = new ErrorCode(1_010_008_003, "只能在同级节点间交换排序");
    ErrorCode QUOTA_RATE_ITEM_NOT_SAME_MODE = new ErrorCode(1_010_008_004, "只能在同一模式下交换排序");
    ErrorCode QUOTA_RATE_ITEM_NOT_VALUE_NODE = new ErrorCode(1_010_008_005, "只有数值节点才能配置取值规则");
    ErrorCode QUOTA_RATE_ITEM_PARENT_NOT_EXISTS = new ErrorCode(1_010_008_006, "父节点不存在");
    ErrorCode QUOTA_RATE_ITEM_PARENT_NOT_SAME_MODE = new ErrorCode(1_010_008_007, "父节点不属于同一模式");
    ErrorCode QUOTA_RATE_ITEM_PARENT_NOT_DIRECTORY = new ErrorCode(1_010_008_008, "父节点必须是目录节点");
    ErrorCode QUOTA_CATALOG_ITEM_SPECIALTY_NOT_FOUND = new ErrorCode(1_010_008_009, "未找到定额专业节点");
    ErrorCode QUOTA_RATE_ITEM_CATALOG_NOT_RATE_MODE = new ErrorCode(1_010_008_010, "catalogItemId 必须指向 rate_mode 类型的节点");

    // ========== 定额费率字段模块 1-010-009-000 ==========
    ErrorCode QUOTA_RATE_FIELD_NOT_EXISTS = new ErrorCode(1_010_009_000, "定额费率字段不存在");
    ErrorCode QUOTA_RATE_FIELD_BINDING_OUT_OF_RANGE = new ErrorCode(1_010_009_001, "绑定的节点不在当前定额专业范围内");

    // ========== 定额取费项模块 1-010-010-000 ==========
    ErrorCode QUOTA_FEE_ITEM_NOT_EXISTS = new ErrorCode(1_010_010_000, "定额取费项不存在");
    ErrorCode QUOTA_FEE_ITEM_CATALOG_NOT_RATE_MODE = new ErrorCode(1_010_010_001, "catalogItemId 必须指向 rate_mode 类型的节点");
    ErrorCode QUOTA_FEE_ITEM_CUSTOM_CODE_DUPLICATE = new ErrorCode(1_010_010_002, "自定义序号 [{}] 已存在");
    ErrorCode QUOTA_FEE_ITEM_NOT_SAME_CATALOG = new ErrorCode(1_010_010_003, "只能在同一模式下交换排序");
    ErrorCode QUOTA_FEE_CALC_BASE_FORMULA_EMPTY = new ErrorCode(1_010_010_004, "计算基数公式不能为空");
    ErrorCode QUOTA_FEE_CALC_BASE_VARIABLES_EMPTY = new ErrorCode(1_010_010_005, "计算基数变量不能为空");
    ErrorCode QUOTA_FEE_CALC_BASE_INVALID_PRICE_CODE = new ErrorCode(1_010_010_006, "无效的价格代码: {}");
    ErrorCode QUOTA_FEE_CALC_BASE_FORMULA_BRACKET_MISMATCH = new ErrorCode(1_010_010_007, "公式括号不匹配");
    ErrorCode QUOTA_FEE_CALC_BASE_FORMULA_INVALID_CHAR = new ErrorCode(1_010_010_008, "公式包含非法字符");

    // ========== 定额调整设置模块 1-010-011-000 ==========
    ErrorCode QUOTA_ADJUSTMENT_NOT_EXISTS = new ErrorCode(1_010_011_000, "定额调整设置不存在");
    ErrorCode QUOTA_ADJUSTMENT_NOT_SAME_QUOTA_ITEM = new ErrorCode(1_010_011_001, "只能在同一定额子目下交换排序");
    ErrorCode QUOTA_ADJUSTMENT_TYPE_INVALID = new ErrorCode(1_010_011_002, "无效的调整类型");
    ErrorCode QUOTA_ADJUSTMENT_RULES_INVALID = new ErrorCode(1_010_011_003, "调整规则格式不正确");
    ErrorCode QUOTA_ADJUSTMENT_MATERIAL_CODE_DUPLICATE = new ErrorCode(1_010_011_004, "工料机编码 [{}] 重复");
    ErrorCode QUOTA_ADJUSTMENT_CATEGORY_DUPLICATE = new ErrorCode(1_010_011_005, "类别ID [{}] 重复");
    ErrorCode QUOTA_ADJUSTMENT_COEFFICIENT_INVALID = new ErrorCode(1_010_011_006, "系数必须大于0");
    ErrorCode QUOTA_ADJUSTMENT_MIN_MAX_INVALID = new ErrorCode(1_010_011_007, "最小值必须小于最大值");
    ErrorCode QUOTA_ADJUSTMENT_DENOMINATOR_ZERO = new ErrorCode(1_010_011_008, "分母不能为0");
    ErrorCode QUOTA_ADJUSTMENT_BASE_VALUE_OUT_OF_RANGE = new ErrorCode(1_010_011_009, "基础值必须在最小值和最大值之间");
    ErrorCode QUOTA_ADJUSTMENT_ROUNDING_RULE_INVALID = new ErrorCode(1_010_011_010, "无效的取值规则");
    ErrorCode QUOTA_ADJUSTMENT_INPUT_VALUE_OUT_OF_RANGE = new ErrorCode(1_010_011_011, "输入值 [{}] 超出范围 [{}, {}]");
    ErrorCode QUOTA_ADJUSTMENT_RESOURCE_DUPLICATE = new ErrorCode(1_010_011_012, "工料机ID [{}] 重复");

    // ========== 清单配置目录树模块 1-010-012-000 ==========
    ErrorCode BOQ_CATALOG_ITEM_NOT_EXISTS = new ErrorCode(1_010_012_000, "清单配置目录树节点不存在");
    ErrorCode BOQ_CATALOG_ITEM_CODE_DUPLICATE = new ErrorCode(1_010_012_001, "编码 [{}] 已存在");
    ErrorCode BOQ_CATALOG_ITEM_INVALID_NODE_TYPE = new ErrorCode(1_010_012_002, "无效的节点类型");
    ErrorCode BOQ_CATALOG_ITEM_SPECIALTY_LOCKED = new ErrorCode(1_010_012_003, "该清单专业已绑定，不可修改或删除");
    ErrorCode BOQ_CATALOG_ITEM_HAS_CHILDREN = new ErrorCode(1_010_012_004, "该节点存在子节点，无法删除");
    ErrorCode BOQ_CATALOG_ITEM_NOT_SPECIALTY = new ErrorCode(1_010_012_005, "该节点不是清单专业节点");
    ErrorCode BOQ_CATALOG_ITEM_ALREADY_BOUND = new ErrorCode(1_010_012_006, "该清单专业已绑定定额基价");
    ErrorCode BOQ_CATALOG_ITEM_QUOTA_NOT_FIRST_LEVEL = new ErrorCode(1_010_012_007, "只能绑定定额基价第一层节点");
    ErrorCode BOQ_CATALOG_ITEM_PARENT_NOT_EXISTS = new ErrorCode(1_010_012_008, "父节点不存在");
    ErrorCode BOQ_CATALOG_ITEM_NOT_SAME_LEVEL = new ErrorCode(1_010_012_009, "只能在同级节点间交换排序");
    ErrorCode BOQ_CATALOG_ITEM_NOT_BOUND_QUOTA = new ErrorCode(1_010_012_010, "该清单专业尚未绑定定额基价");

    // ========== 清单项树模块 1-010-013-000 ==========
    ErrorCode BOQ_ITEM_TREE_NOT_EXISTS = new ErrorCode(1_010_013_000, "清单项树节点不存在");
    ErrorCode BOQ_ITEM_TREE_CODE_DUPLICATE = new ErrorCode(1_010_013_001, "编码 [{}] 已存在");
    ErrorCode BOQ_ITEM_TREE_HAS_CHILDREN = new ErrorCode(1_010_013_002, "该节点存在子节点，无法删除");
    ErrorCode BOQ_ITEM_TREE_PARENT_NOT_EXISTS = new ErrorCode(1_010_013_003, "父节点不存在");
    ErrorCode BOQ_ITEM_TREE_NOT_SAME_LEVEL = new ErrorCode(1_010_013_004, "只能在同级节点间交换排序");

    // ========== 清单子项模块 1-010-014-000 ==========
    ErrorCode BOQ_SUB_ITEM_NOT_EXISTS = new ErrorCode(1_010_014_000, "清单子项不存在");
    ErrorCode BOQ_SUB_ITEM_CODE_DUPLICATE = new ErrorCode(1_010_014_001, "编码 [{}] 已存在");
    ErrorCode BOQ_SUB_ITEM_NOT_SAME_TREE = new ErrorCode(1_010_014_002, "只能在同一清单项树下交换排序");

    // ========== 清单明细树模块 1-010-015-000 ==========
    ErrorCode BOQ_DETAIL_TREE_NOT_EXISTS = new ErrorCode(1_010_015_000, "清单明细树节点不存在");
    ErrorCode BOQ_DETAIL_TREE_CODE_DUPLICATE = new ErrorCode(1_010_015_001, "编码 [{}] 已存在");
    ErrorCode BOQ_DETAIL_TREE_HAS_CHILDREN = new ErrorCode(1_010_015_002, "该节点存在子节点，无法删除");
    ErrorCode BOQ_DETAIL_TREE_PARENT_NOT_DIRECTORY = new ErrorCode(1_010_015_003, "父节点必须是目录类型");
    ErrorCode BOQ_DETAIL_TREE_INVALID_NODE_TYPE = new ErrorCode(1_010_015_004, "无效的节点类型");
    ErrorCode BOQ_DETAIL_TREE_CONTENT_NEED_QUOTA = new ErrorCode(1_010_015_005, "内容节点必须关联定额");
    ErrorCode BOQ_DETAIL_TREE_DIRECTORY_NO_QUOTA = new ErrorCode(1_010_015_006, "目录节点不能关联定额");
    ErrorCode BOQ_DETAIL_TREE_QUOTA_NOT_IN_RANGE = new ErrorCode(1_010_015_007, "该定额不在绑定的定额专业范围内");
    ErrorCode BOQ_DETAIL_TREE_QUOTA_NOT_CONTENT_TYPE = new ErrorCode(1_010_015_008, "只能关联定额基价第三层的内容节点");
    ErrorCode BOQ_DETAIL_TREE_NOT_SAME_LEVEL = new ErrorCode(1_010_015_009, "只能在同级节点间交换排序");

    // ========== 信息价树结构模块 1-010-016-000 ==========
    ErrorCode INFO_PRICE_TREE_NOT_EXISTS = new ErrorCode(1_010_016_000, "信息价树节点不存在");
    ErrorCode INFO_PRICE_TREE_CODE_DUPLICATE = new ErrorCode(1_010_016_001, "编码 [{}] 已存在");
    ErrorCode INFO_PRICE_TREE_HAS_CHILDREN = new ErrorCode(1_010_016_002, "该节点存在子节点，无法删除");
    ErrorCode INFO_PRICE_TREE_HAS_BOOKS = new ErrorCode(1_010_016_003, "该节点存在信息价册，无法删除");
    ErrorCode INFO_PRICE_TREE_PARENT_NOT_EXISTS = new ErrorCode(1_010_016_004, "父节点不存在");
    ErrorCode INFO_PRICE_TREE_NOT_SAME_LEVEL = new ErrorCode(1_010_016_005, "只能在同级节点间交换排序");
    ErrorCode INFO_PRICE_TREE_NOT_SAME_ENUM_TYPE = new ErrorCode(1_010_016_006, "只能在同一枚举类型下交换排序");
    ErrorCode INFO_PRICE_TREE_INVALID_ENUM_TYPE = new ErrorCode(1_010_016_007, "无效的枚举类型");

    // ========== 信息价册模块 1-010-017-000 ==========
    ErrorCode INFO_PRICE_BOOK_NOT_EXISTS = new ErrorCode(1_010_017_000, "信息价册不存在");
    ErrorCode INFO_PRICE_BOOK_TIME_OVERLAP = new ErrorCode(1_010_017_001, "时间段与已有数据重叠");
    ErrorCode INFO_PRICE_BOOK_TIME_INVALID = new ErrorCode(1_010_017_002, "结束时间必须大于等于开始时间");
    ErrorCode INFO_PRICE_BOOK_INVALID_PUBLISH_STATUS = new ErrorCode(1_010_017_003, "无效的发布状态");
    ErrorCode INFO_PRICE_BOOK_HAS_ITEMS = new ErrorCode(1_010_017_004, "该信息价册存在条目，无法删除");

    // ========== 信息价分类树模块 1-010-018-000 ==========
    ErrorCode INFO_PRICE_CATEGORY_TREE_NOT_EXISTS = new ErrorCode(1_010_018_000, "信息价分类树节点不存在");
    ErrorCode INFO_PRICE_CATEGORY_TREE_CODE_DUPLICATE = new ErrorCode(1_010_018_001, "编码 [{}] 已存在");
    ErrorCode INFO_PRICE_CATEGORY_TREE_HAS_CHILDREN = new ErrorCode(1_010_018_002, "该节点存在子节点，无法删除");
    ErrorCode INFO_PRICE_CATEGORY_TREE_HAS_RESOURCES = new ErrorCode(1_010_018_003, "该节点存在工料机信息，无法删除");
    ErrorCode INFO_PRICE_CATEGORY_TREE_PARENT_NOT_EXISTS = new ErrorCode(1_010_018_004, "父节点不存在");
    ErrorCode INFO_PRICE_CATEGORY_TREE_NOT_SAME_LEVEL = new ErrorCode(1_010_018_005, "只能在同级节点间交换排序");
    ErrorCode INFO_PRICE_CATEGORY_TREE_CONTENT_NO_CHILDREN = new ErrorCode(1_010_018_006, "内容节点不允许添加子节点");
    ErrorCode INFO_PRICE_CATEGORY_TREE_INVALID_NODE_TYPE = new ErrorCode(1_010_018_007, "无效的节点类型");

    // ========== 信息价工料机信息模块 1-010-019-000 ==========
    ErrorCode INFO_PRICE_RESOURCE_NOT_EXISTS = new ErrorCode(1_010_019_000, "信息价工料机信息不存在");
    ErrorCode INFO_PRICE_RESOURCE_CODE_DUPLICATE = new ErrorCode(1_010_019_001, "编码 [{}] 已存在");
    ErrorCode INFO_PRICE_RESOURCE_ONLY_UNDER_CONTENT_NODE = new ErrorCode(1_010_019_002, "只有内容节点才能添加工料机信息");
    ErrorCode INFO_PRICE_RESOURCE_HAS_PRICES = new ErrorCode(1_010_019_003, "该工料机信息存在价格历史，无法删除");
    ErrorCode INFO_PRICE_RESOURCE_NOT_SAME_CATEGORY = new ErrorCode(1_010_019_004, "只能在同一分类节点下交换排序");

    // ========== 信息价工料机价格历史模块 1-010-020-000 ==========
    ErrorCode INFO_PRICE_RESOURCE_PRICE_NOT_EXISTS = new ErrorCode(1_010_020_000, "信息价工料机价格历史不存在");
    ErrorCode INFO_PRICE_RESOURCE_PRICE_TIME_OVERLAP = new ErrorCode(1_010_020_001, "时间段与已有数据重叠");
    ErrorCode INFO_PRICE_RESOURCE_PRICE_TIME_INVALID = new ErrorCode(1_010_020_002, "结束时间必须大于等于开始时间");
    ErrorCode INFO_PRICE_RESOURCE_PRICE_TIME_NOT_CONTINUOUS = new ErrorCode(1_010_020_003, "时间段必须与前一条记录连续，期望开始时间为 [{}]");

}
