78 lines
1.4 KiB
Protocol Buffer
78 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
||
package initial;
|
||
option go_package = "bsm/full/module/base/initial/pb;initial";
|
||
|
||
|
||
// initial-数据
|
||
service Data{
|
||
rpc Country(Empty) returns (CountryReply) {}
|
||
|
||
// 系统区域数据,默认级别:市
|
||
rpc Areas(AreasRequest) returns (AreasReply) {}
|
||
|
||
// 系统数据
|
||
rpc Datas(Empty) returns (DatasReply) {}
|
||
|
||
}
|
||
|
||
|
||
message Empty{
|
||
}
|
||
|
||
message CountryReply {
|
||
repeated CountryItem countries=1;
|
||
}
|
||
|
||
message CountryItem {
|
||
uint32 id =1;
|
||
string Iso2=2;
|
||
string Iso3=3;
|
||
string num_code=4;
|
||
string phone_code=5;
|
||
string currency=6;
|
||
string currency_symbol=7;
|
||
string region=8;
|
||
string timezones=9;
|
||
string translations=10;
|
||
string name=11;
|
||
string local_name=12;
|
||
bool enabled=13;
|
||
int32 sort_order=14;
|
||
}
|
||
|
||
message AreasRequest {
|
||
// 国家ID,默认:中国 1
|
||
int32 country_id = 1;
|
||
// 国家代码,默认:中国 CN
|
||
string country_code = 2;
|
||
// 是否输出乡镇,默认:市级
|
||
bool show_town = 3;
|
||
}
|
||
|
||
|
||
message AreasReply {
|
||
repeated AreasItem areas=1;
|
||
}
|
||
|
||
message AreasItem {
|
||
string id =1;
|
||
string pid=2;
|
||
int32 deep=3;
|
||
string name=4;
|
||
string pinyin_prefix=5;
|
||
string pinyin=6;
|
||
string ext_id=7;
|
||
string ext_name=8;
|
||
}
|
||
message DatasReply {
|
||
repeated DatasItem datas=1;
|
||
}
|
||
|
||
message DatasItem {
|
||
int64 id =1;
|
||
string data_type=2;
|
||
string key=3;
|
||
string title=4;
|
||
string remark=5;
|
||
string icon=6;
|
||
} |