MarketingSystemDataExportTool/grpc/card/cardv1/global.proto

461 lines
8.5 KiB
Protocol Buffer

syntax = "proto3";
package api.inner;
option go_package = "./card/cardv1;cardv1";
enum BrandStatus {
BRAND_STATUS_UNKNOWN = 0;
// 启用
BRAND_STATUS_ENABLE = 1;
// 禁用
BRAND_STATUS_DISABLE = 2;
}
// 品牌商品状态
enum BrandGoodsStatus {
// 全部
BRAND_GOODS_STATUS_ALL = 0;
// 启用
BRAND_GOODS_STATUS_ENABLE = 1;
// 禁用
BRAND_GOODS_STATUS_DISABLE = 2;
}
enum BrandGoodsType {
// 品牌商品未知类型
BRAND_GOODS_TYPE_UNKNOWN = 0;
// 话费
BRAND_GOODS_TYPE_PHONE = 1;
// 生活缴费
BRAND_GOODS_TYPE_LIFE = 2;
}
// 系统商品状态
enum SystemGoodsStatus {
// 全部
SYSTEM_GOODS_STATUS_ALL = 0;
// 启用
SYSTEM_GOODS_STATUS_ENABLE = 1;
// 禁用
SYSTEM_GOODS_STATUS_DISABLE = 2;
}
// 卡密样式
enum CardType {
// 全部
CARD_STYLE_NONE = 0;
// 卡密+卡号
CARD_STYLE_CARD_NUMBER_PASSWORD = 1;
// 卡密
CARD_STYLE_CARD_PASSWORD = 2;
// 链接
CARD_STYLE_CARD_LINK = 3;
// 图片
CARD_STYLE_CARD_IMAGE = 4;
}
// 卡单模式
enum RestrictMode {
// 继承分销商
RESTRICT_MODE_EXTEND = 0;
// 卡单
RESTRICT_MODE_BLOCK = 1;
// 不卡单
RESTRICT_MODE_UNBLOCK = 2;
}
enum GlobalStatus {
// 全部
GLOBAL_STATUS_ALL = 0;
// 启用
GLOBAL_STATUS_ENABLE = 1;
// 禁用
GLOBAL_STATUS_DISABLE = 2;
}
// 枚举类型
message EnumItem {
// 枚举值
int32 value = 1;
// 枚举描述
string label = 2;
}
// 分页请求参数
message PageReq {
// 页码
int32 page = 1;
// 每页大小
int32 pageSize = 2;
}
// 分页响应参数
message PageReply {
// 总数
int32 total = 1;
// 页码
int32 page = 2;
// 每页大小
int32 pageSize = 3;
}
// 用于下拉框数据
message SelectOption {
string label = 1;
int32 value = 2;
bool disabled = 3;
}
// 品牌明细模型
message BrandItem {
// 品牌名称
string name = 1;
// 品牌ID
uint32 id = 2;
// 创建时间 unix 时间戳
string createdAt = 3;
// 更新时间 unix 时间戳
string updatedAt = 4;
// 是否删除
bool isDeleted = 5;
// 商品列表
repeated BrandGoodsItem brandGoodsList = 6;
// 品牌权益列表
repeated BrandRightsItem rightsList = 7;
// 状态
EnumItem status = 8;
// 品牌权重
uint32 weight = 9;
// 品牌官网
string website = 10;
// 品牌logo
string logo = 11;
// 品牌备注
string remark = 12;
// 品牌商品数量
uint32 goodsCount = 13;
}
// 品牌商品明细模型
message BrandGoodsItem {
// 所属品牌
uint32 brandId = 1;
// 商品ID
uint32 id = 2;
// 商品名称
string name = 3;
// 商品编码
string code = 4;
// 价格
double price = 5;
// 面额
string facePrice = 6;
// 状态
EnumItem status = 7;
// 商品介绍
string remark = 8;
// 权益等级
uint32 rights = 9;
// 创建时间
string createdAt = 10;
// 更新时间
string updatedAt = 11;
// 所属品牌
BrandItem brand = 12;
// 权益等级
BrandRightsItem rightsItem = 13;
// 库存预警值
uint32 stockWarning = 14;
}
message BrandRightsItem {
uint32 id = 1;
string name = 2;
uint32 brandId = 3;
EnumItem status = 4;
string createdAt = 5;
string updatedAt = 6;
}
message BrandRightsBase {
// 权益ID
uint32 id = 1;
// 权益名称
string name = 2;
// 是否禁用
bool disabled = 4;
}
// 用于下拉框数据
message SelectOptionWithCode {
string label = 1;
int32 value = 2;
bool disabled = 3;
string code = 4;
}
// 系统商品明细模型
message SystemGoodsItem {
// 系统商品名称
string name = 1;
// 系统商品ID
uint32 id = 2;
// 创建时间 unix 时间戳
string createdAt = 3;
// 更新时间 unix 时间戳
string updatedAt = 4;
// 是否删除
bool isDeleted = 5;
// 所属品牌商品
uint32 brandGoodsId = 6;
// 状态
EnumItem status = 8;
// 品牌商品明细
BrandGoodsItem brandGoods = 9;
// 备注
string remark = 12;
// 商品售价
double price = 14;
// 商品code
string code = 17;
// 商品类型
repeated SystemGoodsTypeItem systemGoodsTypes = 18;
// 卡密样式
EnumItem cardType = 19;
}
// 系统商品类目
message SystemGoodsTypeItem {
// 类目ID
uint32 id = 1;
// 类目名称
string name = 2;
// 创建时间 unix 时间戳
string createdAt = 3;
// 更新时间 unix 时间戳
string updatedAt = 4;
// 类目权重
uint32 weight = 5;
// 类目状态
EnumItem status = 6;
// 父级类目
SystemGoodsTypeItem parent = 7;
// 类目说明
string remark = 8;
}
// 分销商简单数据模型
message ResellerSimpleItem {
int32 id = 1;
string name = 2;
}
message AuthorizeResellerGoodsItem {
// 所属上游
uint32 resellerId = 1;
// 授权价格
double price = 2;
// 所属上游明细
ResellerSimpleItem reseller = 3;
}
message ResellerGoodsItem {
uint32 id = 1;
// 下游id
uint32 resellerId = 2;
// 系统商品id
uint32 systemGoodsId = 3;
// 价格
double price = 4;
string createdAt = 5;
string updatedAt = 6;
// 备注
string remark = 7;
// 商品价格
double systemGoodsPrice = 8;
// 状态
EnumItem status = 9;
// 库存预警
int32 stockAlarm = 10;
// 授权时间
string authorizationAt = 11;
// 审批号
string approvalNo = 12;
// 停用原因
string stopReason = 13;
// 系统商品详情
SystemGoodsItem systemGoods = 14;
// 分销商名称
string resellerName = 17;
// 审批状态
EnumItem approvalStatus = 18;
int32 availableStock = 19;
}
message ResellerOrderEntity {
uint32 id = 1;
string orderNo = 2;
string outOrderNo = 3;
uint32 resellerId = 4;
uint32 systemGoodsId = 5;
uint32 resellerGoodsId = 6;
double approvalGoodsPrice = 7;
double systemGoodsPrice = 8;
uint32 goodsNum = 9;
double totalAmount = 10;
double payAmount = 11;
EnumItem payStatus = 12;
// 订单状态:1待审核、2待出库、3处理成功、4处理异常、5处理失败
EnumItem notifyStatus = 14;
EnumItem status = 15;
string remark = 16;
uint32 isManualRetry = 17;
string customBatch = 18;
EnumItem fromType = 19;
string finishedAt = 20;
uint32 notifySubCode = 21;
// 支付单Id
uint32 payOrderId = 22;
string createdAt = 24;
string payOrderNo = 26;
string updatedAt = 27;
string approveNo = 28;
ResellerSimpleItem reseller = 23;
ResellerGoodsItem resellerGoods = 25;
string faceValue = 29;
}
message ResellerOrderLogItem {
uint32 id = 1;
string createdAt = 2;
// 下游订单id
uint32 orderId = 3;
// 日志内容
string content = 4;
// 日志类型
int32 type = 5;
// 备注
string remark = 6;
// 操作
string title = 7;
}
message PayOrderItem {
uint32 id = 1;
string createdAt = 2;
string updatedAt = 3;
string outOrderNo = 4;
string orderNo = 5;
uint32 resellerId = 6;
double payAmount = 7;
EnumItem status = 8;
string remark = 9;
EnumItem fromType = 10;
string mobile = 20;
repeated string emails = 21;
repeated ResellerOrderEntity orders = 11;
repeated ResellerOrderLogItem logs = 12;
// 下游
ResellerSimpleItem reseller = 13;
// 销售员
ResellerSimpleItem saler = 14;
// 创建人
ResellerSimpleItem creator = 15;
// 统计
ResellerOrderStatistics Statistics = 16;
}
enum ResellerOrderRequestStatus {
// 全部
ResellerOrderRequestStatusAll = 0;
// 处理中
ResellerOrderRequestStatusProcessing = 1;
// 成功
ResellerOrderRequestStatusSuccess = 2;
// 失败
ResellerOrderRequestStatusFail = 3;
}
enum PayOrderFromType {
// 全部
PayOrderFromTypeAll = 0;
//API采购
PayOrderFromTypeOpenApi = 1;
// 前台批采
PayOrderFromTypeMerchant = 2;
// 手工新增
PayOrderFromTypeManual = 3;
}
enum ResellerOrderFromType {
// 全部
ResellerOrderFromTypeAll = 0;
// API采购
ResellerOrderFromTypeOpenApi = 1;
// 前台批采
ResellerOrderFromTypeMerchant = 2;
// 手工新增
ResellerOrderFromTypeManual = 3;
}
message ResellerOrderStatistics {
// 总数
uint32 totalNum = 1;
// 处理中数量
uint32 processingNum = 2;
// 处理成功数量
uint32 successNum = 3;
uint32 failNum = 4;
}
// 业务类型
enum PayOrderBusinessType {
// 全部
PayOrderBusinessTypeAll = 0;
// 正常订单
PayOrderBusinessTypeNormal = 1;
// 卡密转直充
PayOrderBusinessTypeDirectRecharge = 2;
// 按采购结算
PayOrderBusinessTypePurchase = 3;
// 虚拟仓出库
PayOrderBusinessTypeVirtualOut = 4;
}
message SupplierItem {
uint32 id = 1;
// 上游名称
string name = 2;
// 状态
EnumItem status = 3;
// 备注
string remark = 4;
// 主体
string subjectName = 5;
// 收款人
string payee = 6;
// 创建时间 unix 时间戳
string createdAt = 7;
// 更新时间 unix 时间戳
string updatedAt = 8;
// 是否删除
bool isDeleted = 9;
// 商务负责人
uint32 sponsorUserId = 10;
// 商务负责人名称
string sponsorUserName = 11;
// 适配器名称
string adapterName = 12;
// 超时查询时间
int32 adapterTimeout = 13;
}