2023-02-11 00:44:00 +08:00
|
|
|
/**
|
|
|
|
* Created by 芋道源码
|
|
|
|
*
|
|
|
|
* 枚举类
|
|
|
|
*/
|
|
|
|
|
|
|
|
// 全局通用状态枚举
|
|
|
|
export const CommonStatusEnum = {
|
|
|
|
ENABLE: 0, // 开启
|
|
|
|
DISABLE: 1 // 禁用
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 菜单的类型枚举
|
|
|
|
*/
|
|
|
|
export const SystemMenuTypeEnum = {
|
|
|
|
DIR: 1, // 目录
|
|
|
|
MENU: 2, // 菜单
|
|
|
|
BUTTON: 3 // 按钮
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 角色的类型枚举
|
|
|
|
*/
|
|
|
|
export const SystemRoleTypeEnum = {
|
|
|
|
SYSTEM: 1, // 内置角色
|
|
|
|
CUSTOM: 2 // 自定义角色
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 数据权限的范围枚举
|
|
|
|
*/
|
|
|
|
export const SystemDataScopeEnum = {
|
|
|
|
ALL: 1, // 全部数据权限
|
|
|
|
DEPT_CUSTOM: 2, // 指定部门数据权限
|
|
|
|
DEPT_ONLY: 3, // 部门数据权限
|
|
|
|
DEPT_AND_CHILD: 4, // 部门及以下数据权限
|
|
|
|
DEPT_SELF: 5 // 仅本人数据权限
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 代码生成模板类型
|
|
|
|
*/
|
|
|
|
export const InfraCodegenTemplateTypeEnum = {
|
|
|
|
CRUD: 1, // 基础 CRUD
|
|
|
|
TREE: 2, // 树形 CRUD
|
|
|
|
SUB: 3 // 主子表 CRUD
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 任务状态的枚举
|
|
|
|
*/
|
|
|
|
export const InfraJobStatusEnum = {
|
|
|
|
INIT: 0, // 初始化中
|
|
|
|
NORMAL: 1, // 运行中
|
|
|
|
STOP: 2 // 暂停运行
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* API 异常数据的处理状态
|
|
|
|
*/
|
|
|
|
export const InfraApiErrorLogProcessStatusEnum = {
|
|
|
|
INIT: 0, // 未处理
|
|
|
|
DONE: 1, // 已处理
|
|
|
|
IGNORE: 2 // 已忽略
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户的社交平台的类型枚举
|
|
|
|
*/
|
|
|
|
export const SystemUserSocialTypeEnum = {
|
|
|
|
DINGTALK: {
|
|
|
|
title: '钉钉',
|
|
|
|
type: 20,
|
|
|
|
source: 'dingtalk',
|
|
|
|
img: 'https://s1.ax1x.com/2022/05/22/OzMDRs.png'
|
|
|
|
},
|
|
|
|
WECHAT_ENTERPRISE: {
|
|
|
|
title: '企业微信',
|
|
|
|
type: 30,
|
|
|
|
source: 'wechat_enterprise',
|
|
|
|
img: 'https://s1.ax1x.com/2022/05/22/OzMrzn.png'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 支付渠道枚举
|
|
|
|
*/
|
|
|
|
export const PayChannelEnum = {
|
|
|
|
WX_PUB: {
|
|
|
|
code: 'wx_pub',
|
|
|
|
name: '微信 JSAPI 支付'
|
|
|
|
},
|
|
|
|
WX_LITE: {
|
|
|
|
code: 'wx_lite',
|
|
|
|
name: '微信小程序支付'
|
|
|
|
},
|
|
|
|
WX_APP: {
|
|
|
|
code: 'wx_app',
|
|
|
|
name: '微信 APP 支付'
|
|
|
|
},
|
2023-08-06 23:25:07 +08:00
|
|
|
WX_BAR: {
|
|
|
|
code: 'wx_bar',
|
|
|
|
name: '微信条码支付'
|
|
|
|
},
|
2023-02-11 00:44:00 +08:00
|
|
|
ALIPAY_PC: {
|
|
|
|
code: 'alipay_pc',
|
|
|
|
name: '支付宝 PC 网站支付'
|
|
|
|
},
|
|
|
|
ALIPAY_WAP: {
|
|
|
|
code: 'alipay_wap',
|
|
|
|
name: '支付宝 WAP 网站支付'
|
|
|
|
},
|
|
|
|
ALIPAY_APP: {
|
|
|
|
code: 'alipay_app',
|
|
|
|
name: '支付宝 APP 支付'
|
|
|
|
},
|
|
|
|
ALIPAY_QR: {
|
|
|
|
code: 'alipay_qr',
|
|
|
|
name: '支付宝扫码支付'
|
2023-04-10 22:29:50 +08:00
|
|
|
},
|
|
|
|
ALIPAY_BAR: {
|
|
|
|
code: 'alipay_bar',
|
|
|
|
name: '支付宝条码支付'
|
2023-08-03 23:07:22 +08:00
|
|
|
},
|
|
|
|
MOCK: {
|
|
|
|
code: 'mock',
|
|
|
|
name: '模拟支付'
|
2023-02-11 00:44:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-06 23:25:07 +08:00
|
|
|
/**
|
|
|
|
* 支付的展示模式每局
|
|
|
|
*/
|
|
|
|
export const PayDisplayModeEnum = {
|
|
|
|
URL: {
|
|
|
|
mode: 'url'
|
|
|
|
},
|
|
|
|
IFRAME: {
|
|
|
|
mode: 'iframe'
|
|
|
|
},
|
|
|
|
FORM: {
|
|
|
|
mode: 'form'
|
|
|
|
},
|
|
|
|
QR_CODE: {
|
|
|
|
mode: 'qr_code'
|
|
|
|
},
|
|
|
|
APP: {
|
|
|
|
mode: 'app'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-11 00:44:00 +08:00
|
|
|
/**
|
|
|
|
* 支付类型枚举
|
|
|
|
*/
|
|
|
|
export const PayType = {
|
|
|
|
WECHAT: 'WECHAT',
|
2023-08-03 23:07:22 +08:00
|
|
|
ALIPAY: 'ALIPAY',
|
|
|
|
MOCK: 'MOCK'
|
2023-02-11 00:44:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 支付订单状态枚举
|
|
|
|
*/
|
|
|
|
export const PayOrderStatusEnum = {
|
|
|
|
WAITING: {
|
|
|
|
status: 0,
|
|
|
|
name: '未支付'
|
|
|
|
},
|
|
|
|
SUCCESS: {
|
|
|
|
status: 10,
|
|
|
|
name: '已支付'
|
|
|
|
},
|
|
|
|
CLOSED: {
|
|
|
|
status: 20,
|
|
|
|
name: '未支付'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-01 18:08:23 +08:00
|
|
|
/**
|
|
|
|
* 商品 SPU 状态
|
|
|
|
*/
|
|
|
|
export const ProductSpuStatusEnum = {
|
|
|
|
RECYCLE: {
|
|
|
|
status: -1,
|
|
|
|
name: '回收站'
|
|
|
|
},
|
|
|
|
DISABLE: {
|
|
|
|
status: 0,
|
|
|
|
name: '下架'
|
|
|
|
},
|
|
|
|
ENABLE: {
|
|
|
|
status: 1,
|
|
|
|
name: '上架'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-26 18:19:39 +08:00
|
|
|
/**
|
|
|
|
* 优惠劵模板的有限期类型的枚举
|
|
|
|
*/
|
|
|
|
export const CouponTemplateValidityTypeEnum = {
|
|
|
|
DATE: {
|
|
|
|
type: 1,
|
|
|
|
name: '固定日期可用'
|
|
|
|
},
|
|
|
|
TERM: {
|
|
|
|
type: 2,
|
|
|
|
name: '领取之后可用'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-01 23:50:26 +08:00
|
|
|
/**
|
|
|
|
* 优惠劵模板的领取方式的枚举
|
|
|
|
*/
|
|
|
|
export const CouponTemplateTakeTypeEnum = {
|
2023-09-02 00:34:45 +08:00
|
|
|
USER: {
|
2023-09-01 23:50:26 +08:00
|
|
|
type: 1,
|
|
|
|
name: '直接领取'
|
|
|
|
},
|
2023-09-02 00:34:45 +08:00
|
|
|
ADMIN: {
|
2023-09-01 23:50:26 +08:00
|
|
|
type: 2,
|
|
|
|
name: '指定发放'
|
|
|
|
},
|
2023-09-02 00:34:45 +08:00
|
|
|
REGISTER: {
|
2023-09-01 23:50:26 +08:00
|
|
|
type: 3,
|
|
|
|
name: '新人券'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-26 18:19:39 +08:00
|
|
|
/**
|
|
|
|
* 营销的商品范围枚举
|
|
|
|
*/
|
|
|
|
export const PromotionProductScopeEnum = {
|
|
|
|
ALL: {
|
|
|
|
scope: 1,
|
2023-09-02 00:12:21 +08:00
|
|
|
name: '通用劵'
|
2023-05-26 18:19:39 +08:00
|
|
|
},
|
|
|
|
SPU: {
|
|
|
|
scope: 2,
|
2023-09-02 00:12:21 +08:00
|
|
|
name: '商品劵'
|
2023-08-30 20:54:20 +08:00
|
|
|
},
|
|
|
|
CATEGORY: {
|
|
|
|
scope: 3,
|
2023-09-02 00:12:21 +08:00
|
|
|
name: '品类劵'
|
2023-05-26 18:19:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 营销的条件类型枚举
|
|
|
|
*/
|
|
|
|
export const PromotionConditionTypeEnum = {
|
|
|
|
PRICE: {
|
|
|
|
type: 10,
|
|
|
|
name: '满 N 元'
|
|
|
|
},
|
|
|
|
COUNT: {
|
|
|
|
type: 20,
|
|
|
|
name: '满 N 件'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 优惠类型枚举
|
|
|
|
*/
|
|
|
|
export const PromotionDiscountTypeEnum = {
|
|
|
|
PRICE: {
|
|
|
|
type: 1,
|
|
|
|
name: '满减'
|
|
|
|
},
|
|
|
|
PERCENT: {
|
|
|
|
type: 2,
|
|
|
|
name: '折扣'
|
|
|
|
}
|
|
|
|
}
|
2023-09-03 21:14:44 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 分销关系绑定模式枚举
|
|
|
|
*/
|
|
|
|
export const BrokerageBindModeEnum = {
|
|
|
|
ANYTIME: {
|
2023-09-28 15:29:15 +08:00
|
|
|
mode: 1,
|
|
|
|
name: '首次绑定'
|
2023-09-03 21:14:44 +08:00
|
|
|
},
|
|
|
|
REGISTER: {
|
2023-09-28 15:29:15 +08:00
|
|
|
mode: 2,
|
|
|
|
name: '注册绑定'
|
|
|
|
},
|
|
|
|
OVERRIDE: {
|
|
|
|
mode: 3,
|
|
|
|
name: '覆盖绑定'
|
2023-09-03 21:14:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 分佣模式枚举
|
|
|
|
*/
|
|
|
|
export const BrokerageEnabledConditionEnum = {
|
|
|
|
ALL: {
|
2023-09-28 15:29:15 +08:00
|
|
|
condition: 1,
|
2023-09-03 21:14:44 +08:00
|
|
|
name: '人人分销'
|
|
|
|
},
|
|
|
|
ADMIN: {
|
2023-09-28 15:29:15 +08:00
|
|
|
condition: 2,
|
2023-09-03 21:14:44 +08:00
|
|
|
name: '指定分销'
|
|
|
|
}
|
|
|
|
}
|
2023-09-10 23:30:43 +08:00
|
|
|
/**
|
|
|
|
* 佣金记录业务类型枚举
|
|
|
|
*/
|
|
|
|
export const BrokerageRecordBizTypeEnum = {
|
|
|
|
ORDER: {
|
|
|
|
type: 1,
|
|
|
|
name: '获得推广佣金'
|
|
|
|
},
|
|
|
|
WITHDRAW: {
|
|
|
|
type: 2,
|
|
|
|
name: '提现申请'
|
|
|
|
}
|
|
|
|
}
|
2023-09-19 22:03:28 +08:00
|
|
|
/**
|
|
|
|
* 佣金提现状态枚举
|
|
|
|
*/
|
|
|
|
export const BrokerageWithdrawStatusEnum = {
|
|
|
|
AUDITING: {
|
|
|
|
status: 0,
|
|
|
|
name: '审核中'
|
|
|
|
},
|
|
|
|
AUDIT_SUCCESS: {
|
|
|
|
status: 10,
|
|
|
|
name: '审核通过'
|
|
|
|
},
|
|
|
|
AUDIT_FAIL: {
|
|
|
|
status: 20,
|
|
|
|
name: '审核不通过'
|
|
|
|
},
|
|
|
|
WITHDRAW_SUCCESS: {
|
|
|
|
status: 11,
|
|
|
|
name: '提现成功'
|
|
|
|
},
|
|
|
|
WITHDRAW_FAIL: {
|
|
|
|
status: 21,
|
|
|
|
name: '提现失败'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 佣金提现类型枚举
|
|
|
|
*/
|
|
|
|
export const BrokerageWithdrawTypeEnum = {
|
|
|
|
WALLET: {
|
|
|
|
type: 1,
|
|
|
|
name: '钱包'
|
|
|
|
},
|
|
|
|
BANK: {
|
|
|
|
type: 2,
|
|
|
|
name: '银行卡'
|
|
|
|
},
|
|
|
|
WECHAT: {
|
|
|
|
type: 3,
|
|
|
|
name: '微信'
|
|
|
|
},
|
|
|
|
ALIPAY: {
|
|
|
|
type: 4,
|
|
|
|
name: '支付宝'
|
|
|
|
}
|
|
|
|
}
|