package com.zt.plat.module.base.enums;

import com.zt.plat.framework.common.exception.ErrorCode;

/**
 * base 错误码枚举类
 * base 系统，使用 1-xxx-xxx-xxx 段
 * @author ZT
 */
public interface ErrorCodeConstants {

    // ========== 示例模块 1-001-000-000 ==========
    ErrorCode MATERIAL_OTHER_NOT_EXISTS = new ErrorCode(1_001_000_001, "物料不存在");
    ErrorCode ELEMENT_NOT_EXISTS = new ErrorCode(1_001_000_001, "金属元素不存在");
    ErrorCode ELEMENT_EXISTS = new ErrorCode(1_001_000_002, "金属元素已经存在");
    ErrorCode CONTACT_NOT_EXISTS = new ErrorCode(1_001_000_001, "联系人不存在");
    ErrorCode ACCOUNT_NOT_EXISTS = new ErrorCode(1_001_000_001, "账户条款不存在");
    ErrorCode MATERIAL_DESTROY_NOT_EXISTS = new ErrorCode(1_001_000_001, "物料回收率不存在");
    ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_001_000_001, "物料信息不存在");
    ErrorCode COMPANY_RELATIVITY_NOT_EXISTS = new ErrorCode(1_001_000_001, "公司关系不存在");
    ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_001_000_001, "库位不存在");
    ErrorCode WAREHOUSE_CODE_EXISTS = new ErrorCode(1_001_000_002, "库位编码已存在");
    ErrorCode FACTORY_NOT_EXISTS = new ErrorCode(1_001_000_001, "工厂不存在");
    ErrorCode TAX_NOT_EXISTS = new ErrorCode(1_001_000_001, "公司关系不存在");
    ErrorCode BUSINESS_DICTIONARY_TYPE_NOT_EXISTS = new ErrorCode(1_027_200_003, "业务字典类型不存在");
    // ========== 模板文档管理系统 1-006-xxx-xxx ==========
    // 模板分类 1-006-001-xxx
    ErrorCode TEMPLATE_CATEGORY_NOT_EXISTS = new ErrorCode(1_006_001_001, "模板分类不存在");

    // 标签库 1-006-002-xxx
    ErrorCode TEMPLATE_TAG_NOT_EXISTS = new ErrorCode(1_006_002_001, "标签不存在");
    ErrorCode TEMPLATE_TAG_CODE_DUPLICATE = new ErrorCode(1_006_002_002, "标签编码已存在");

    // 模板 1-006-003-xxx
    ErrorCode TEMPLATE_NOT_EXISTS = new ErrorCode(1_006_003_001, "模板不存在");
    ErrorCode TEMPLATE_CODE_DUPLICATE = new ErrorCode(1_006_003_002, "模板编码已存在");

    // 模板实例 1-006-004-xxx
    ErrorCode TEMPLATE_INSTANCE_NOT_EXISTS = new ErrorCode(1_006_004_001, "模板实例不存在");
    ErrorCode TEMPLATE_INSTANCE_CODE_DUPLICATE = new ErrorCode(1_006_004_002, "实例编码已存在");

    // 模板导出 1-006-005-xxx
    ErrorCode TEMPLATE_EXPORT_TYPE_ERROR = new ErrorCode(1_006_005_001, "不支持的导出类型");
    ErrorCode TEMPLATE_EXPORT_FAILED = new ErrorCode(1_006_005_002, "模板导出失败");

    // ========== 物料属性  ==========
    ErrorCode MATERIAL_PROPERTIES_NOT_EXISTS = new ErrorCode(1_027_101_001, "物料属性不存在");
    ErrorCode MATERIAL_HAS_PROPERTIES_NOT_EXISTS = new ErrorCode(1_027_101_002, "物料持有属性不存在");
    ErrorCode MATERIAL_CLASSES_NOT_EXISTS = new ErrorCode(1_027_101_003, "物料分类不存在");
    ErrorCode DEPARTMENT_MATERIAL_EXISTS = new ErrorCode(1_027_101_004, "组织物料已存在");
    ErrorCode DEPARTMENT_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_004, "组织物料不存在");
    ErrorCode MATERIAL_HAS_CLASSES_NOT_EXISTS = new ErrorCode(1_027_101_004, "物料持有属性不存在");
    ErrorCode MATERIAL_HAS_PROPERTIES_CODE_DUPLICATE = new ErrorCode(1_027_101_106, "同一物料下该属性编码已存在");

    ErrorCode MATERIAL_CLASSES_HIERARCHY_INVALID = new ErrorCode(1_027_101_101, "物料分类层级不符合 1-2-3 的层级规则");
    ErrorCode MATERIAL_CLASSES_PARENT_NOT_EXISTS = new ErrorCode(1_027_101_102, "上级物料分类不存在");
    ErrorCode MATERIAL_CLASSES_MAX_LEVEL_EXCEEDED = new ErrorCode(1_027_101_103, "物料分类最多支持三级");
    ErrorCode MATERIAL_CLASSES_LEVEL_CONFLICT_WITH_CHILDREN = new ErrorCode(1_027_101_104, "存在下级分类，无法调整当前分类层级");
    ErrorCode MATERIAL_CLASSES_LEVEL3_REQUIRED_FOR_MATERIAL = new ErrorCode(1_027_101_105, "仅允许三级物料分类关联物料");

    // ========== 物料牌号扩展 ==========
    ErrorCode MATERIAL_GRADE_EXT_NOT_EXISTS = new ErrorCode(1_027_101_201, "物料牌号扩展不存在");

    // ========== 工艺信息属性  ==========
    ErrorCode PROCESSING_INFOMATION_NOT_EXISTS = new ErrorCode(1_027_101_005, "工艺信息不存在");
    ErrorCode PROCESSING_INFOMATION_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_006, "工艺工序不存在");
    ErrorCode PROCESSING_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_007, "工序不存在");
    ErrorCode PROCESSING_OPERATION_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_008, "工艺工序物料不存在");
    ErrorCode PLAN_DATE_NOT_EXISTS = new ErrorCode(1_027_101_009, "计划数据不存在");
    ErrorCode PLAN_ORD_NOT_EXISTS = new ErrorCode(1_027_101_010, "计划与订单关系不存在");
    ErrorCode PLAN_ORD_EXISTS = new ErrorCode(1_027_101_011, "该种类的绑定关系已存在");
    // ========== 主数据同步  ==========
    ErrorCode MASTER_DATA_SYNC_DISABLED = new ErrorCode(1_027_900_001, "主数据同步功能已禁用");
    ErrorCode MASTER_DATA_SYNC_BATCH_SIZE_TOO_LARGE = new ErrorCode(1_027_900_002, "最大批次不得超过 1000");
}
