syntax = "proto3"; package bundle; option go_package = "./bundle"; service Bundle { rpc CreateBundle(BundleProfile) returns (CommonResponse) {} rpc UpdateBundle(BundleProfile) returns (CommonResponse) {} rpc DeleteBundle(DelBundleRequest) returns (CommonResponse) {} rpc BundleList(BundleListRequest) returns (BundleListResponse) {} rpc BundleDetail(BundleDetailRequest) returns (BundleDetailResponse) {} rpc CreateOrderRecord(OrderRecord) returns (CommonResponse) {} rpc UpdateOrderRecord(OrderRecord) returns (CommonResponse) {} rpc UpdateOrderRecordByOrderNo(OrderRecord) returns (CommonResponse) {} rpc OrderRecordsList(OrderRecordsRequest) returns (OrderRecordsResponse) {} rpc OrderRecordsDetail(OrderRecordsDetailRequest) returns (OrderRecordsDetailResponse) {} //增值套餐 rpc CreateValueAddBundle(ValueAddBundleProfile) returns (CommonResponse) {} rpc UpdateValueAddBundle(ValueAddBundleProfile) returns (CommonResponse) {} rpc DeleteValueAddBundle(DelValueAddBundleRequest) returns (CommonResponse) {} rpc ValueAddBundleList(ValueAddBundleListRequest) returns (ValueAddBundleListResponse) {} rpc ValueAddBundleDetail(ValueAddBundleDetailRequest) returns (ValueAddBundleDetailResponse) {} rpc ValueAddBundleRecordDetail(ValueAddBundleDetailRequest) returns(ValueAddBundleDetailResponse) {} } message CommonResponse { string msg = 1 [json_name = "msg"]; string uuid = 2 [json_name = "uuid"]; string orderNo = 3 [json_name = "orderNo"]; } message BundleProfile { 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 contract = 6 [json_name = "contract"]; string language = 7 [json_name = "language"]; string createdAt = 8 [json_name = "createdAt"]; string updatedAt = 9 [json_name = "updatedAt"]; string companySign = 10 [json_name = "companySign"]; int64 contractDuration = 11 [json_name = "contractDuration"]; } 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"]; string language = 5 [json_name = "language"]; } message BundleListResponse { repeated BundleProfile bundles = 1 [json_name = "bundles"]; int32 total = 2 [json_name = "total"]; } message BundleDetailRequest { string uuid = 1 [json_name = "uuid"]; } message BundleDetailResponse { BundleProfile bundle = 1 [json_name = "bundle"]; string msg = 2 [json_name = "msg"]; } 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"]; float amount = 6 [json_name = "amount"]; 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"]; int64 status = 15 [json_name = "status"]; string orderNo = 16 [json_name = "orderNo"]; string bundleName = 17 [json_name = "bundleName"]; string contractNo = 18 [json_name = "contractNo"]; bool isHaveValueAdd = 19 [json_name = "isHaveValueAdd"]; //是否有增值套餐 bool isValueAddCustom= 20 [json_name = "isValueAddCustom"]; //是否自定义增值套餐条数 string valueAddBundleUuid= 21 [json_name= "valueAddBundleUuid"]; //增值套餐UUID int64 ValueAddBundleNum= 22 [json_name= "ValueAddBundleNum"]; //增值套餐条数 float OriginalPrice= 23 [json_name= "OriginalPrice"]; //增值套餐原单价 float DiscountPrice= 24 [json_name= "DiscountPrice"]; //增值套餐优惠单价 float ValueAddBundleAmount= 25 [json_name= "ValueAddBundleAmount"]; //增值套餐总价 float SavedAmount= 26 [json_name= "SavedAmount"]; //增值套餐节省金额 float totalAmount = 27 [json_name = "totalAmount"]; //总金额 } 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"]; string IsHaveValueAdd = 14 [json_name = "IsHaveValueAdd"];//有无增值选项 } message OrderRecordsResponse { repeated OrderRecord orderRecords = 1 [json_name = "orderRecords"]; int32 total = 2 [json_name = "total"]; } message OrderRecordsDetailRequest { string uuid = 1 [json_name = "uuid"]; string orderNo = 2 [json_name = "orderNo"]; string customerID = 3 [json_name = "customerID"]; } message OrderRecordsDetailResponse { OrderRecord orderRecord = 1 [json_name = "orderRecord"]; string msg = 2 [json_name = "msg"]; } // 增值套餐 message ValueAddBundleProfile { string uuid = 1 [json_name = "uuid"]; string name = 2 [json_name = "name"]; int64 num = 3 [json_name = "num"]; float originalPrice = 4 [json_name = "originalPrice"]; float discountPrice = 5 [json_name = "discountPrice"]; float totalPrice = 6 [json_name = "totalPrice"]; float savedAmount = 7 [json_name = "savedAmount"]; string language = 11 [json_name = "language"]; string createdAt = 12 [json_name = "createdAt"]; string updatedAt = 13 [json_name = "updatedAt"]; } message DelValueAddBundleRequest { string uuid = 1 [json_name = "uuid"]; } // 增值套餐列表请求 message ValueAddBundleListRequest { int32 page = 1 [json_name = "page"]; int32 pageSize = 2 [json_name = "pageSize"]; string name = 3 [json_name = "name"]; int64 num = 4 [json_name = "num"]; float originalPrice = 5 [json_name = "originalPrice"]; float discountPrice = 6 [json_name = "discountPrice"]; float totalPrice = 7 [json_name = "totalPrice"]; float savedAmount = 8 [json_name = "savedAmount"]; string language = 9 [json_name = "language"]; } message ValueAddBundleListResponse { repeated ValueAddBundleProfile bundles = 1 [json_name = "bundles"]; int32 total = 2 [json_name = "total"]; } message ValueAddBundleDetailRequest { string uuid = 1 [json_name = "uuid"]; } message ValueAddBundleDetailResponse { ValueAddBundleProfile bundle = 1 [json_name = "bundle"]; string msg = 2 [json_name = "msg"]; }