micro-bundle/pb/bundle.proto

307 lines
12 KiB
Protocol Buffer
Raw Normal View History

2025-02-20 12:40:39 +00:00
syntax = "proto3";
package bundle;
option go_package = "./bundle";
2025-03-28 01:23:17 +00:00
import "pb/descriptor.proto";
import "pb/validator.proto";
2025-02-20 12:40:39 +00:00
service Bundle {
rpc CreateBundle(BundleProfile) returns (CommonResponse) {}
rpc UpdateBundle(BundleProfile) returns (CommonResponse) {}
rpc DeleteBundle(DelBundleRequest) returns (CommonResponse) {}
2025-05-28 01:34:43 +00:00
rpc HandShelf(HandShelfRequest) returns(CommonResponse) {} //更新套餐上下架状态
rpc SaveBundle(BundleProfile)returns (SaveResponse) {}
rpc BundleListV2(BundleListRequest) returns(BundleListResponse) {}
rpc BundleDetailV2(BundleDetailRequest) returns(BundleDetailResponseV2) {}
2025-02-20 12:40:39 +00:00
rpc BundleList(BundleListRequest) returns (BundleListResponse) {}
rpc BundleDetail(BundleDetailRequest) returns (BundleDetailResponse) {}
rpc CreateOrderRecord(OrderRecord) returns (CommonResponse) {}
rpc UpdateOrderRecord(OrderRecord) returns (CommonResponse) {}
2025-02-21 13:09:54 +00:00
rpc UpdateOrderRecordByOrderNo(OrderRecord) returns (CommonResponse) {}
2025-02-20 12:40:39 +00:00
rpc OrderRecordsList(OrderRecordsRequest) returns (OrderRecordsResponse) {}
rpc OrderRecordsDetail(OrderRecordsDetailRequest) returns (OrderRecordsDetailResponse) {}
rpc UpdateFinancialConfirmationStatus(FinancialConfirmationRequest) returns (CommonResponse) {}
2025-02-20 12:40:39 +00:00
2025-03-25 08:30:09 +00:00
//增值套餐
2025-03-28 01:23:17 +00:00
rpc CreateValueAddBundle(CreateValueAddBundleRequest) returns (CreateValueAddBundleResponse) {}
2025-03-25 08:30:09 +00:00
rpc ValueAddBundleList(ValueAddBundleListRequest) returns (ValueAddBundleListResponse) {}
rpc ValueAddBundleDetail(ValueAddBundleDetailRequest) returns (ValueAddBundleDetailResponse) {}
2025-05-28 01:34:43 +00:00
//新增值服务
rpc SaveValueAddService(ValueAddServiceLang) returns (SaveResponse) {}
rpc ValueAddServiceList(ValueAddServiceListRequest) returns (ValueAddServiceListResponse) {}
rpc ValueAddServiceDetail(ValueAddServiceDetailRequest) returns (ValueAddServiceDetailResponse) {}
2025-02-20 12:40:39 +00:00
}
message CommonResponse {
string msg = 1 [json_name = "msg"];
string uuid = 2 [json_name = "uuid"];
2025-02-22 11:16:11 +00:00
string orderNo = 3 [json_name = "orderNo"];
2025-02-20 12:40:39 +00:00
}
message BundleProfile {
string uuid = 1 [json_name = "uuid"];
string name = 2 [json_name = "name"];
2025-02-22 11:05:19 +00:00
float price = 3 [json_name = "price"];
2025-03-28 12:29:44 +00:00
int64 priceType = 4 [json_name = "priceType"];
2025-02-20 12:40:39 +00:00
string content = 5 [json_name = "content"];
string contract = 6 [json_name = "contract"];
string language = 7 [json_name = "language"];
string createdAt = 8 [json_name = "createdAt"];
string updatedAt = 9 [json_name = "updatedAt"];
2025-03-12 02:45:26 +00:00
string companySign = 10 [json_name = "companySign"];
int64 contractDuration = 11 [json_name = "contractDuration"];
2025-03-28 20:59:56 +00:00
string bundleCommonUid = 12 [json_name = "bundleCommonUid"];
2025-05-28 01:34:43 +00:00
int64 sort = 13 [json_name = "sort"];
string bgImg1 = 14 [json_name = "bgImg1"];
string bgImg2 = 15 [json_name = "bgImg2"];
int64 shelfStatus = 16 [json_name = "shelfStatus"]; // 1 上架 2 下架
repeated SelectValueAddService selectValueAddService = 17 [json_name = "SelectValueAddService"];
repeated BundleProfileLang bundleProfileLang = 18 [json_name = "bundleProfileLang"];
}
message BundleProfileLang {
string uuid = 1 [json_name = "uuid"];
string name = 2 [json_name = "name"];
float price = 3 [json_name = "price"];
int64 priceType = 4 [json_name = "priceType"];
string content = 5 [json_name = "content"];
string language = 6 [json_name = "language"];
string createdAt = 7 [json_name = "createdAt"];
string updatedAt = 8 [json_name = "updatedAt"];
string bgImg1 = 9 [json_name = "bgImg1"];
string bgImg2 = 10 [json_name = "bgImg2"];
int64 sort = 11 [json_name = "sort"];
repeated ValueAddServiceLang valueAddServiceLang = 12 [json_name = "ValueAddServiceLang"];
}
message SaveResponse {
string msg = 1 [json_name = "msg"];
string uuid = 2 [json_name = "uuid"];
int64 cancelNum = 3 [json_name = "cancelNum"];
}
message SelectValueAddService {
string valueAddUuid = 1 [json_name = "valueAddUuid"];
string serviceName= 2 [json_name = "serviceName"];
bool isDisplay = 3 [json_name = "isDisplay"];
2025-02-20 12:40:39 +00:00
}
message DelBundleRequest {
string uuid = 1 [json_name = "uuid"];
}
message BundleListRequest {
int32 page = 1 [json_name = "page"];
int32 pageSize = 2 [json_name = "pageSize"];
string name = 3 [json_name = "name"];
string content = 4 [json_name = "content"];
2025-02-22 11:05:19 +00:00
string language = 5 [json_name = "language"];
2025-02-20 12:40:39 +00:00
}
message BundleListResponse {
repeated BundleProfile bundles = 1 [json_name = "bundles"];
int32 total = 2 [json_name = "total"];
}
message BundleDetailRequest {
string uuid = 1 [json_name = "uuid"];
2025-05-28 01:34:43 +00:00
string language = 2 [json_name = "language"]; //语言 默认zh-CN zh-CN zh-TW EN de-DE js-JP
}
message HandShelfRequest {
string uuid = 1 [json_name = "uuid"];
int64 shelfStatus = 2 [json_name = "shelfStatus"]; // 1 上架 2 下架
2025-02-20 12:40:39 +00:00
}
message BundleDetailResponse {
BundleProfile bundle = 1 [json_name = "bundle"];
string msg = 2 [json_name = "msg"];
}
2025-05-28 01:34:43 +00:00
message BundleDetailResponseV2{
BundleProfileLang bundle = 1 [json_name = "bundle"];
repeated SelectValueAddService selectValueAddService = 2 [json_name = "SelectValueAddService"];
string msg =3 [json_name = "msg"];
}
2025-02-20 12:40:39 +00:00
message OrderRecord {
string uuid = 1 [json_name = "uuid"];
string bundleUuid = 2 [json_name = "bundleUuid"];
string customerID = 3 [json_name = "customerID"];
string customerNum = 4 [json_name = "customerNum"];
string customerName = 5 [json_name = "customerName"];
2025-02-22 11:10:19 +00:00
float amount = 6 [json_name = "amount"];
2025-02-20 12:40:39 +00:00
int64 amountType = 7 [json_name = "amountType"];
string signContract = 8 [json_name = "signContract"];
string signature = 9 [json_name = "signature"];
string signedTime = 10 [json_name = "signedTime"];
int64 payType = 11 [json_name = "payType"];
string payTime = 12 [json_name = "payTime"];
string checkoutSessionId = 13 [json_name = "checkoutSessionId"];
string checkoutSessionUrl = 14 [json_name = "checkoutSessionUrl"];
2025-02-21 13:09:54 +00:00
int64 status = 15 [json_name = "status"];
2025-02-20 12:40:39 +00:00
string orderNo = 16 [json_name = "orderNo"];
string bundleName = 17 [json_name = "bundleName"];
2025-03-12 02:45:26 +00:00
string contractNo = 18 [json_name = "contractNo"];
2025-03-28 18:05:56 +00:00
string valueAddBundleUuid= 19 [json_name= "valueAddBundleUuid"]; //增值套餐UUID
float valueAddBundleAmount = 20 [json_name = "valueAddBundleAmount"]; //增值套餐金额
float valueAddOriginalPrice= 21 [json_name= "valueAddOriginalPrice"]; //原单价
float valueAddDiscountPrice= 22 [json_name= "valueAddDiscountPrice"]; //优惠单价
float valueAddSavedAmount= 23 [json_name= "valueAddSavedAmount"]; //节省金额
2025-04-14 08:28:06 +00:00
int32 num = 24 [json_name = "num"];
2025-03-28 18:05:56 +00:00
float totalAmount = 25 [json_name = "totalAmount"]; //总金额
2025-04-14 08:28:06 +00:00
string sex = 26 [json_name = "sex"];
2025-03-28 18:05:56 +00:00
string nationality = 27 [json_name = "nationality"];
string certificatePicture = 28 [json_name = "certificatePicture"];
string placeOfResidence = 29 [json_name = "placeOfResidence"];
string groupPhoto = 30 [json_name = "groupPhoto"];
2025-03-28 20:59:56 +00:00
string bundleCommonUid = 31 [json_name = "bundleCommonUid"];
string addBundleCommonUid = 32 [json_name = "addBundleCommonUid"];
int32 financialConfirmation = 33 [json_name = "financialConfirmation"];
string telNum = 34 [json_name = "telNum"];
2025-02-20 12:40:39 +00:00
}
message OrderRecordsRequest {
int32 page = 1 [json_name = "page"];
int32 pageSize = 2 [json_name = "pageSize"];
string customerNum = 3 [json_name = "customerNum"];
string customerName = 4 [json_name = "customerName"];
string bundleUUID = 5 [json_name = "bundleUUID"];
string orderNo = 6 [json_name = "orderNo"];
int64 status = 7 [json_name = "status"];
string bundleName = 8 [json_name = "bundleName"];
string startSignedTime = 9 [json_name = "startSignedTime"];
string endSignedTime = 10 [json_name = "endSignedTime"];
string startPayTime = 11 [json_name = "startPayTime"];
string endPayTime = 12 [json_name = "endPayTime"];
string customerID = 13 [json_name = "customerID"];
2025-03-28 02:54:04 +00:00
int64 isHaveValueAdd = 14 [json_name = "isHaveValueAdd"];//有无增值选项
int32 financialConfirmation = 15 [json_name = "financialConfirmation"];
string telNum = 16 [json_name = "telNum"];
2025-02-20 12:40:39 +00:00
}
message OrderRecordsResponse {
repeated OrderRecord orderRecords = 1 [json_name = "orderRecords"];
int32 total = 2 [json_name = "total"];
}
message OrderRecordsDetailRequest {
string uuid = 1 [json_name = "uuid"];
2025-02-21 13:09:54 +00:00
string orderNo = 2 [json_name = "orderNo"];
2025-02-23 12:56:42 +00:00
string customerID = 3 [json_name = "customerID"];
2025-02-20 12:40:39 +00:00
}
message OrderRecordsDetailResponse {
OrderRecord orderRecord = 1 [json_name = "orderRecord"];
string msg = 2 [json_name = "msg"];
2025-03-25 08:30:09 +00:00
}
// 增值套餐
message ValueAddBundleProfile {
string uuid = 1 [json_name = "uuid"];
2025-03-28 01:23:17 +00:00
int32 num = 2 [json_name = "num"];
float originalPrice = 3 [json_name = "originalPrice"];
float discountPrice = 4 [json_name = "discountPrice"];
2025-03-25 08:30:09 +00:00
float totalPrice = 6 [json_name = "totalPrice"];
float savedAmount = 7 [json_name = "savedAmount"];
2025-03-28 01:23:17 +00:00
bool discountPriceStatus = 8 [json_name = "discountPriceStatus"];
bool choose = 9 [json_name = "choose"];
2025-03-28 08:47:41 +00:00
bool status = 10 [json_name = "status"];
2025-03-28 20:59:56 +00:00
string addBundleCommonUid = 11 [json_name = "addBundleCommonUid"];
2025-03-25 08:30:09 +00:00
}
2025-03-28 01:23:17 +00:00
message CreateValueAddBundleRequest {
int32 num = 1 [json_name = "num",(validator.field) = {int_gt: 29, int_lt:101, human_error: "至少数为30,最多数为100"}];
}
2025-03-25 08:30:09 +00:00
2025-03-28 01:23:17 +00:00
message CreateValueAddBundleResponse {
2025-03-25 08:30:09 +00:00
string uuid = 1 [json_name = "uuid"];
2025-03-28 01:23:17 +00:00
float totalPrice = 2 [json_name = "totalPrice"];
float savedAmount = 3 [json_name = "savedAmount"];
string msg = 4 [json_name = "msg"];
2025-03-25 08:30:09 +00:00
}
// 增值套餐列表请求
message ValueAddBundleListRequest {
2025-03-28 08:47:41 +00:00
int32 userId = 1 [json_name = "userId"];
string bundleUuid = 2 [json_name = "bundleUuid"];
2025-03-28 18:05:56 +00:00
int32 priceType = 3 [json_name = "priceType"];
2025-03-25 08:30:09 +00:00
}
2025-03-28 01:23:17 +00:00
2025-03-25 08:30:09 +00:00
message ValueAddBundleListResponse {
2025-03-28 01:23:17 +00:00
float originalPrice = 1 [json_name = "originalPrice"];
2025-03-25 08:30:09 +00:00
int32 total = 2 [json_name = "total"];
2025-03-28 01:23:17 +00:00
repeated ValueAddBundleProfile data = 3 [json_name = "data"];
2025-03-28 08:47:41 +00:00
bool status = 4 [json_name = "status"];
int32 num = 5 [json_name = "num"];
float price = 6 [json_name = "price"];
2025-03-28 22:59:17 +00:00
bool orderNo = 7 [json_name = "orderNo"];
string msg = 8 [json_name = "msg"];
2025-03-25 08:30:09 +00:00
}
2025-03-28 01:23:17 +00:00
2025-03-25 08:30:09 +00:00
message ValueAddBundleDetailRequest {
string uuid = 1 [json_name = "uuid"];
}
2025-03-28 01:23:17 +00:00
2025-03-25 08:30:09 +00:00
message ValueAddBundleDetailResponse {
2025-03-28 01:23:17 +00:00
ValueAddBundleProfile data = 1 [json_name = "data"];
2025-03-28 02:54:04 +00:00
string payTime = 2 [json_name = "payTime"];
string msg = 3 [json_name = "msg"];
}
message FinancialConfirmationRequest {
string orderNo = 1 [json_name = "orderNo"];
2025-05-28 01:34:43 +00:00
}
// ****************************************************新增值服务***********************
//增值服务
message ValueAddService {
string uuid = 1 [json_name = "uuid"];
string serviceName = 2 [json_name = "serviceName"]; //服务名称
int32 serviceType = 3 [json_name = "serviceType"];
repeated ValueAddServiceLang serviceLang = 4 [json_name = "serviceLang"];
}
message ValueAddServiceLang {
string uuid = 1 [json_name = "uuid"];
string serviceName = 2 [json_name = "serviceName"]; //服务名称
int32 serviceType = 3 [json_name = "serviceType"];
int32 priceMode = 4 [json_name = "priceMode"];
string originalPrice = 5 [json_name = "originalPrice"];
string unit = 6 [json_name = "unit"];
int64 priceType = 7 [json_name = "priceType"];
string language = 8 [json_name = "language"];
string createdAt = 9 [json_name = "createdAt"];
string updatedAt = 10 [json_name = "updatedAt"];
repeated ValueAddPriceOptions options = 12 [json_name = "options"];
}
//增值服务价格选项
message ValueAddPriceOptions {
int64 id = 1 [json_name = "id"];
int32 num = 2 [json_name = "num"];
string symbol = 3 [json_name = "symbol"];
string price = 4 [json_name = "price"];
}
//增值服务列表
message ValueAddServiceListRequest {
int32 page = 1 [json_name = "page"];
int32 pageSize = 2 [json_name = "pageSize"];
string name = 3 [json_name = "name"];
string language = 4 [json_name = "language"];
}
message ValueAddServiceListResponse {
int32 total = 1 [json_name = "total"];
string msg = 2 [json_name = "msg"];
repeated ValueAddService valueAddServiceList = 3 [json_name = "valueAddServiceList"];
}
//增值服务详情
message ValueAddServiceDetailRequest {
string uuid = 1 [json_name = "uuid"];
string language = 2 [json_name = "language"]; //语言 默认zh-CN zh-CN zh-TW EN de-DE js-JP
}
message ValueAddServiceDetailResponse {
string msg = 1 [json_name = "msg"];
ValueAddServiceLang valueAddServiceLang = 2 [json_name = "valueAddServiceLang"];
}
//*********************************新增值服务-over******************************************