174 lines
3.3 KiB
Protocol Buffer
174 lines
3.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package sale;
|
|
option go_package = "lone-services/rpc/sale";
|
|
import "google/api/annotations.proto";
|
|
|
|
service Sale {
|
|
// 销售分组
|
|
rpc GroupItems(GroupItemsReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/group"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc GroupCreate(GroupCreateReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/sales/group"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc GroupNames(GroupEmptyReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/group/names"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// 销售管理
|
|
rpc Types(GroupEmptyReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/types"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Names(NamesReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/names"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc NamesInternal(NamesReq) returns (NamesData);
|
|
rpc Create(CreateReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/sales"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Edit(EditReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
put: "/admin/v3/sales"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Info(InfoReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales/info"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Items(ItemsReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/sales"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Status(StatusReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
put: "/admin/v3/sales/status"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message GroupEmptyReq {}
|
|
|
|
message GroupItemsReq {
|
|
uint32 page = 1;
|
|
uint32 page_size = 2;
|
|
string name = 3;
|
|
}
|
|
|
|
message GroupCreateReq {
|
|
string name = 1;
|
|
}
|
|
|
|
message NamesReq {
|
|
uint32 type = 1;
|
|
string name = 2;
|
|
uint32 level = 3;
|
|
}
|
|
|
|
message NameItem {
|
|
int64 id = 1;
|
|
string mobile = 2;
|
|
string name = 3;
|
|
}
|
|
|
|
message NamesData {
|
|
repeated NameItem items = 1;
|
|
}
|
|
|
|
message CreateReq {
|
|
string mobile = 1;
|
|
string name = 2;
|
|
string id_card_front = 3;
|
|
string password = 4;
|
|
string account = 5;
|
|
uint32 sex = 6;
|
|
int64 group_id = 7;
|
|
string birth_date = 8;
|
|
int64 sale_id = 9;
|
|
uint32 type = 10;
|
|
int64 territory_id = 11;
|
|
string territory_name = 12;
|
|
int64 province_id = 13;
|
|
int64 city_id = 14;
|
|
int64 district_id = 15;
|
|
string region_province = 16;
|
|
string region_city = 17;
|
|
string region_district = 18;
|
|
string address = 19;
|
|
string id_card_back = 20;
|
|
string business_license = 21;
|
|
}
|
|
|
|
message EditReq {
|
|
int64 id = 1;
|
|
string mobile = 2;
|
|
string name = 3;
|
|
string id_card_front = 4;
|
|
string account = 5;
|
|
uint32 sex = 6;
|
|
int64 group_id = 7;
|
|
string birth_date = 8;
|
|
int64 sale_id = 9;
|
|
uint32 type = 10;
|
|
int64 territory_id = 11;
|
|
string territory_name = 12;
|
|
int64 province_id = 13;
|
|
int64 city_id = 14;
|
|
int64 district_id = 15;
|
|
string region_province = 16;
|
|
string region_city = 17;
|
|
string region_district = 18;
|
|
string address = 19;
|
|
string id_card_back = 20;
|
|
string business_license = 21;
|
|
}
|
|
|
|
message InfoReq {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message ItemsReq {
|
|
string name = 1;
|
|
uint32 page = 2;
|
|
uint32 page_size = 3;
|
|
int64 sale_id = 4;
|
|
uint32 type = 5;
|
|
uint32 status = 6;
|
|
}
|
|
|
|
message StatusReq {
|
|
int64 id = 1;
|
|
uint32 status = 2;
|
|
string reason = 3;
|
|
}
|