220 lines
4.2 KiB
Protocol Buffer
220 lines
4.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
package order;
|
|
option go_package = "lone-services/rpc/order";
|
|
|
|
|
|
message OrderItemsRequest {
|
|
int32 page = 1;
|
|
int32 size = 2;
|
|
int64 product_id =3;
|
|
string order_sn = 4;
|
|
string mobile = 5;
|
|
int64 store_id = 6;
|
|
int64 sale_id = 7;
|
|
string time = 8;
|
|
int32 status = 9;
|
|
}
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message CreateOrderRequest {
|
|
int64 address_id = 1;
|
|
string note = 2;
|
|
int32 type = 3;
|
|
}
|
|
|
|
message CreateOrderOneRequest {
|
|
int64 address_id = 1;
|
|
string note = 2;
|
|
int64 product_id = 3;
|
|
int32 num = 4;
|
|
int32 type = 5;
|
|
}
|
|
|
|
message EditAddressRequest {
|
|
string district = 1;
|
|
string address = 2;
|
|
string name = 3;
|
|
string mobile = 4;
|
|
string district_ids = 5;
|
|
bool default = 6;
|
|
int64 id = 7;
|
|
int32 type = 8;
|
|
}
|
|
|
|
message StatusAddressRequest {
|
|
int64 id = 1;
|
|
int32 status = 2;
|
|
string reason = 3;
|
|
}
|
|
|
|
message EmptyRequest {
|
|
}
|
|
|
|
message EditCartRequest {
|
|
string info = 1;
|
|
int32 type = 2;
|
|
}
|
|
|
|
message CartRequest {
|
|
int32 type = 1;
|
|
}
|
|
|
|
message IdRequest {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message IdAndTypeRequest {
|
|
int64 id = 1;
|
|
int32 type = 2;
|
|
}
|
|
|
|
message TypeRequest {
|
|
int32 type = 1;
|
|
}
|
|
|
|
message AddressItemsRequest {
|
|
int32 page = 1;
|
|
int32 size = 2;
|
|
int64 district_id =3;
|
|
string name = 4;
|
|
string mobile = 5;
|
|
int64 store_id = 6;
|
|
int64 sale_id = 7;
|
|
repeated string time = 8;
|
|
}
|
|
|
|
message AddressByStoreItemsRequest {
|
|
int64 store_id = 1;
|
|
}
|
|
|
|
message OrderAuditingItemsRequest {
|
|
int32 page = 1;
|
|
int32 size = 2;
|
|
int32 status = 3;
|
|
repeated string time = 8;
|
|
}
|
|
|
|
message OrderAuditingRequest {
|
|
int64 id = 1;
|
|
int32 status = 2;
|
|
string reason = 3;
|
|
}
|
|
|
|
message AdminCreateOrderRequest {
|
|
int64 address_id = 1;
|
|
string note = 2;
|
|
string info = 3;
|
|
}
|
|
|
|
service order {
|
|
rpc Items(OrderItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/order/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc WebCreate(CreateOrderRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/order/create"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc WebCreateOne(CreateOrderOneRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/order/create/one"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc WebAddressCreate(EditAddressRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/address/create"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc WebAddressEdit(EditAddressRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/address/edit"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc WebAddressDel(IdAndTypeRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/address/del"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc WebAddressDef(IdAndTypeRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/address/def"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc WebAddressInfo(IdAndTypeRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/api/v3/address/info"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc WebAddressItems(TypeRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/api/v3/address/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc WebCart(CartRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/api/v3/cart"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc WebCartEdit(EditCartRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/cart/edit"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc AddressItem(AddressItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/address/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc AddressByStore(AddressByStoreItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/address/store/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc OrderAuditingItems(OrderAuditingItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/order/auditing/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc OrderAuditing(OrderAuditingRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/order/auditing"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc OrderCreate(AdminCreateOrderRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/order/create"
|
|
body: "*"
|
|
};
|
|
};
|
|
} |