40 lines
729 B
Thrift
40 lines
729 B
Thrift
namespace go area
|
|
|
|
enum Code {
|
|
Success = 1
|
|
ParamInvalid = 2
|
|
DBErr = 3
|
|
ServerError = 4
|
|
}
|
|
|
|
struct Area {
|
|
1: string ChineseName
|
|
2: string EnglishName
|
|
3: string ISO2
|
|
4: string ISO3
|
|
5: string NumCode
|
|
6: string PhoneCode
|
|
7: string DomainSuffix
|
|
8: i64 Id
|
|
}
|
|
|
|
|
|
|
|
struct QueryAreaRequest{
|
|
1: optional string Keyword (api.query="keyword")
|
|
2: i64 page (api.query="page",api.vd="$ > 0")
|
|
3: i64 page_size (api.query="page_size",api.vd="($ > 0 || $ <= 100)")
|
|
}
|
|
|
|
struct QueryAreaResponse{
|
|
1: Code code
|
|
2: string msg
|
|
3: list<Area> areas
|
|
4: i64 total
|
|
}
|
|
|
|
service AreaService {
|
|
QueryAreaResponse QueryUser(1: QueryAreaRequest req)(api.get="/v1/area/query/")
|
|
|
|
}
|