add discount
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
5ecaa0f09b
commit
797bf40fdc
|
@ -162,8 +162,9 @@ message CartItem {
|
||||||
int64 count = 10;
|
int64 count = 10;
|
||||||
int64 amount = 11;
|
int64 amount = 11;
|
||||||
int64 amountOld = 12;
|
int64 amountOld = 12;
|
||||||
repeated Variant variants = 13;
|
int64 discount = 13;
|
||||||
repeated Label labels = 14;
|
repeated Variant variants = 14;
|
||||||
|
repeated Label labels = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
message CartReq {
|
message CartReq {
|
||||||
|
@ -174,6 +175,7 @@ message CartRsp {
|
||||||
repeated CartItem items = 1;
|
repeated CartItem items = 1;
|
||||||
int64 amount = 2;
|
int64 amount = 2;
|
||||||
int64 amountOld = 3;
|
int64 amountOld = 3;
|
||||||
|
int64 discount = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetImageReq {
|
message GetImageReq {
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
GET http://localhost:8090/catalog
|
GET http://localhost:8090/catalog
|
||||||
|
User-Agent: crabs/1.0.0
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
GET http://localhost:8090/products/1
|
GET http://localhost:8090/products/1
|
||||||
|
User-Agent: crabs/1.0.0
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
POST http://localhost:8090/cart
|
POST http://localhost:8090/cart
|
||||||
content-type: application/json
|
User-Agent: crabs/1.0.0
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -23,7 +26,8 @@ content-type: application/json
|
||||||
###
|
###
|
||||||
|
|
||||||
POST http://localhost:8090/orders
|
POST http://localhost:8090/orders
|
||||||
content-type: application/json
|
User-Agent: crabs/1.0.0
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Иванов Иван",
|
"name": "Иванов Иван",
|
||||||
|
@ -43,3 +47,4 @@ content-type: application/json
|
||||||
###
|
###
|
||||||
|
|
||||||
GET http://localhost:8090/search?text=Лимон
|
GET http://localhost:8090/search?text=Лимон
|
||||||
|
User-Agent: crabs/1.0.0
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package cart
|
package cart
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cake_crm/internal/modules/storage"
|
|
||||||
"cake_crm/proto"
|
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
"cake_crm/internal/modules/storage"
|
||||||
|
"cake_crm/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ProductAndCount struct {
|
type ProductAndCount struct {
|
||||||
|
@ -54,6 +55,7 @@ func (s *Service) GetCart(ctx context.Context, items []*proto.OrderItem) (*proto
|
||||||
Count: item.Count,
|
Count: item.Count,
|
||||||
Amount: amount,
|
Amount: amount,
|
||||||
AmountOld: amountOld,
|
AmountOld: amountOld,
|
||||||
|
Discount: amountOld - amount,
|
||||||
Variants: product.Variants,
|
Variants: product.Variants,
|
||||||
Labels: product.Labels,
|
Labels: product.Labels,
|
||||||
},
|
},
|
||||||
|
@ -65,6 +67,7 @@ func (s *Service) GetCart(ctx context.Context, items []*proto.OrderItem) (*proto
|
||||||
Items: res,
|
Items: res,
|
||||||
Amount: cartAmount,
|
Amount: cartAmount,
|
||||||
AmountOld: cartAmountOld,
|
AmountOld: cartAmountOld,
|
||||||
|
Discount: cartAmountOld - cartAmount,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
POST http://0.0.0.0:8090/cart
|
|
||||||
User-Agent: crabs/1.0.0
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"productId": 1,
|
|
||||||
"count": 20
|
|
||||||
}
|
|
||||||
]
|
|
157
proto/main.pb.go
157
proto/main.pb.go
|
@ -1105,8 +1105,9 @@ type CartItem struct {
|
||||||
Count int64 `protobuf:"varint,10,opt,name=count,proto3" json:"count,omitempty"`
|
Count int64 `protobuf:"varint,10,opt,name=count,proto3" json:"count,omitempty"`
|
||||||
Amount int64 `protobuf:"varint,11,opt,name=amount,proto3" json:"amount,omitempty"`
|
Amount int64 `protobuf:"varint,11,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||||
AmountOld int64 `protobuf:"varint,12,opt,name=amountOld,proto3" json:"amountOld,omitempty"`
|
AmountOld int64 `protobuf:"varint,12,opt,name=amountOld,proto3" json:"amountOld,omitempty"`
|
||||||
Variants []*Variant `protobuf:"bytes,13,rep,name=variants,proto3" json:"variants,omitempty"`
|
Discount int64 `protobuf:"varint,13,opt,name=discount,proto3" json:"discount,omitempty"`
|
||||||
Labels []*Label `protobuf:"bytes,14,rep,name=labels,proto3" json:"labels,omitempty"`
|
Variants []*Variant `protobuf:"bytes,14,rep,name=variants,proto3" json:"variants,omitempty"`
|
||||||
|
Labels []*Label `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CartItem) Reset() {
|
func (x *CartItem) Reset() {
|
||||||
|
@ -1211,6 +1212,13 @@ func (x *CartItem) GetAmountOld() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CartItem) GetDiscount() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Discount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *CartItem) GetVariants() []*Variant {
|
func (x *CartItem) GetVariants() []*Variant {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Variants
|
return x.Variants
|
||||||
|
@ -1280,6 +1288,7 @@ type CartRsp struct {
|
||||||
Items []*CartItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
|
Items []*CartItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
|
||||||
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||||
AmountOld int64 `protobuf:"varint,3,opt,name=amountOld,proto3" json:"amountOld,omitempty"`
|
AmountOld int64 `protobuf:"varint,3,opt,name=amountOld,proto3" json:"amountOld,omitempty"`
|
||||||
|
Discount int64 `protobuf:"varint,4,opt,name=discount,proto3" json:"discount,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CartRsp) Reset() {
|
func (x *CartRsp) Reset() {
|
||||||
|
@ -1335,6 +1344,13 @@ func (x *CartRsp) GetAmountOld() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CartRsp) GetDiscount() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Discount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type GetImageReq struct {
|
type GetImageReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1534,7 +1550,7 @@ var file_main_proto_rawDesc = []byte{
|
||||||
0x74, 0x65, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69,
|
0x74, 0x65, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
|
||||||
0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xca, 0x02, 0x0a, 0x08, 0x43, 0x61, 0x72,
|
0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe6, 0x02, 0x0a, 0x08, 0x43, 0x61, 0x72,
|
||||||
0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65,
|
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12,
|
||||||
|
@ -1549,72 +1565,75 @@ var file_main_proto_rawDesc = []byte{
|
||||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||||
0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a,
|
0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a,
|
||||||
0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6c, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03,
|
0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6c, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03,
|
||||||
0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6c, 0x64, 0x12, 0x2e, 0x0a, 0x08, 0x76,
|
0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6c, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64,
|
||||||
0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
|
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64,
|
||||||
0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e,
|
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61,
|
||||||
0x74, 0x52, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x6c,
|
0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x72, 0x61, 0x62,
|
||||||
0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x72,
|
0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x08, 0x76,
|
||||||
0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c,
|
0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c,
|
||||||
0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x35, 0x0a, 0x07, 0x43, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71,
|
0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e,
|
||||||
0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x63, 0x72, 0x6d, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c,
|
||||||
0x14, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x4f, 0x72, 0x64, 0x65,
|
0x73, 0x22, 0x35, 0x0a, 0x07, 0x43, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x2a, 0x0a, 0x05,
|
||||||
0x72, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x6a, 0x0a, 0x07,
|
0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x72,
|
||||||
0x43, 0x61, 0x72, 0x74, 0x52, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
|
0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x74, 0x65,
|
||||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63,
|
0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x72,
|
||||||
0x72, 0x6d, 0x2e, 0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65,
|
0x74, 0x52, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20,
|
||||||
0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
|
0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e,
|
||||||
0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6d,
|
0x43, 0x61, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61,
|
0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6c, 0x64, 0x22, 0x21, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49,
|
0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
|
||||||
0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
0x74, 0x4f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1f, 0x0a, 0x09, 0x53,
|
0x6e, 0x74, 0x4f, 0x6c, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74,
|
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x32, 0xaa, 0x05, 0x0a,
|
0x74, 0x22, 0x21, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71,
|
||||||
0x03, 0x43, 0x52, 0x4d, 0x12, 0x4f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c,
|
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||||
0x6f, 0x67, 0x12, 0x18, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47,
|
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1f, 0x0a, 0x09, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65,
|
||||||
0x65, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x63,
|
0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,
|
0x04, 0x74, 0x65, 0x78, 0x74, 0x32, 0xaa, 0x05, 0x0a, 0x03, 0x43, 0x52, 0x4d, 0x12, 0x4f, 0x0a,
|
||||||
0x52, 0x73, 0x70, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x63, 0x61,
|
0x0a, 0x47, 0x65, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x2e, 0x63, 0x72,
|
||||||
0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x5c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69,
|
0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72,
|
0x6f, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72,
|
||||||
0x6d, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
0x6d, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x73, 0x70, 0x22, 0x10, 0x82, 0xd3,
|
||||||
0x71, 0x1a, 0x17, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x50, 0x6f,
|
0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x5c,
|
||||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x73, 0x70, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93,
|
0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a,
|
||||||
0x02, 0x11, 0x12, 0x0f, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b,
|
0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
|
||||||
0x69, 0x64, 0x7d, 0x12, 0x55, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x63, 0x72, 0x61,
|
||||||
0x74, 0x12, 0x18, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47, 0x65,
|
0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||||
0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x63, 0x72,
|
0x52, 0x73, 0x70, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x70, 0x6f,
|
||||||
0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52,
|
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x55, 0x0a, 0x0a,
|
||||||
0x73, 0x70, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x70, 0x72, 0x6f,
|
0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x18, 0x2e, 0x63, 0x72, 0x61,
|
||||||
0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6d, 0x0a, 0x0e, 0x47, 0x65,
|
0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
||||||
0x74, 0x42, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x75, 0x6d, 0x62, 0x73, 0x12, 0x1c, 0x2e, 0x63,
|
0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d,
|
||||||
0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61,
|
0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x73, 0x70, 0x22, 0x16, 0x82, 0xd3, 0xe4,
|
||||||
0x64, 0x63, 0x72, 0x75, 0x6d, 0x62, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x63, 0x72, 0x61,
|
0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b,
|
||||||
0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x42, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x75, 0x6d,
|
0x69, 0x64, 0x7d, 0x12, 0x6d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x64, 0x63,
|
||||||
0x62, 0x73, 0x52, 0x73, 0x70, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f,
|
0x72, 0x75, 0x6d, 0x62, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72,
|
||||||
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x62, 0x72,
|
0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x75, 0x6d, 0x62, 0x73,
|
||||||
0x65, 0x61, 0x64, 0x63, 0x72, 0x75, 0x6d, 0x62, 0x73, 0x12, 0x49, 0x0a, 0x05, 0x4f, 0x72, 0x64,
|
0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e,
|
||||||
0x65, 0x72, 0x12, 0x13, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x4f,
|
0x42, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x75, 0x6d, 0x62, 0x73, 0x52, 0x73, 0x70, 0x22, 0x22,
|
||||||
0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e,
|
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
|
||||||
0x63, 0x72, 0x6d, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x16, 0x82, 0xd3,
|
0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x62, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x75, 0x6d,
|
||||||
0xe4, 0x93, 0x02, 0x10, 0x3a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x07, 0x2f, 0x6f, 0x72,
|
0x62, 0x73, 0x12, 0x49, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x63, 0x72,
|
||||||
0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x74, 0x12,
|
0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||||
0x12, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x43, 0x61, 0x72, 0x74,
|
0x1a, 0x13, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x4f, 0x72, 0x64,
|
||||||
0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e,
|
0x65, 0x72, 0x52, 0x73, 0x70, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x05, 0x6f,
|
||||||
0x43, 0x61, 0x72, 0x74, 0x52, 0x73, 0x70, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a,
|
0x72, 0x64, 0x65, 0x72, 0x22, 0x07, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a,
|
||||||
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x05, 0x2f, 0x63, 0x61, 0x72, 0x74, 0x12, 0x50, 0x0a,
|
0x07, 0x47, 0x65, 0x74, 0x43, 0x61, 0x72, 0x74, 0x12, 0x12, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73,
|
||||||
0x08, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x72, 0x61, 0x62,
|
0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x43, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x63,
|
||||||
0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65,
|
0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x43, 0x61, 0x72, 0x74, 0x52, 0x73, 0x70,
|
||||||
0x71, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48,
|
0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22,
|
||||||
0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12,
|
0x05, 0x2f, 0x63, 0x61, 0x72, 0x74, 0x12, 0x50, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61,
|
||||||
0x0e, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12,
|
0x67, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x47,
|
||||||
0x48, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2e, 0x63, 0x72, 0x61, 0x62,
|
0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
|
||||||
0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a,
|
0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79,
|
||||||
0x17, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x69,
|
0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x73, 0x70, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09,
|
0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x48, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72,
|
||||||
0x12, 0x07, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x0e, 0x92, 0x41, 0x00, 0x5a, 0x09,
|
0x63, 0x68, 0x12, 0x14, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x53,
|
||||||
0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73,
|
||||||
0x33,
|
0x2e, 0x63, 0x72, 0x6d, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x73,
|
||||||
|
0x70, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x73, 0x65, 0x61, 0x72,
|
||||||
|
0x63, 0x68, 0x42, 0x0e, 0x92, 0x41, 0x00, 0x5a, 0x09, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -363,6 +363,10 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
},
|
},
|
||||||
|
"discount": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
"variants": {
|
"variants": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
|
@ -396,6 +400,10 @@
|
||||||
"amountOld": {
|
"amountOld": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"discount": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "int64"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue