This commit is contained in:
yanweidong 2025-09-08 16:56:48 +08:00
parent 951c9bc89f
commit e9e4874f27
8 changed files with 434 additions and 297 deletions

View File

@ -109,10 +109,15 @@ class CountryReply extends $pb.GeneratedMessage {
class CountryItem extends $pb.GeneratedMessage { class CountryItem extends $pb.GeneratedMessage {
factory CountryItem({ factory CountryItem({
$core.int? id, $core.int? id,
$core.String? code, $core.String? iso2,
$core.String? code3, $core.String? iso3,
$core.String? numCode, $core.String? numCode,
$core.String? phoneCode, $core.String? phoneCode,
$core.String? currency,
$core.String? currencySymbol,
$core.String? region,
$core.String? timezones,
$core.String? translations,
$core.String? name, $core.String? name,
$core.String? localName, $core.String? localName,
$core.bool? enabled, $core.bool? enabled,
@ -120,10 +125,15 @@ class CountryItem extends $pb.GeneratedMessage {
}) { }) {
final result = create(); final result = create();
if (id != null) result.id = id; if (id != null) result.id = id;
if (code != null) result.code = code; if (iso2 != null) result.iso2 = iso2;
if (code3 != null) result.code3 = code3; if (iso3 != null) result.iso3 = iso3;
if (numCode != null) result.numCode = numCode; if (numCode != null) result.numCode = numCode;
if (phoneCode != null) result.phoneCode = phoneCode; if (phoneCode != null) result.phoneCode = phoneCode;
if (currency != null) result.currency = currency;
if (currencySymbol != null) result.currencySymbol = currencySymbol;
if (region != null) result.region = region;
if (timezones != null) result.timezones = timezones;
if (translations != null) result.translations = translations;
if (name != null) result.name = name; if (name != null) result.name = name;
if (localName != null) result.localName = localName; if (localName != null) result.localName = localName;
if (enabled != null) result.enabled = enabled; if (enabled != null) result.enabled = enabled;
@ -145,14 +155,19 @@ class CountryItem extends $pb.GeneratedMessage {
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'), package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
createEmptyInstance: create) createEmptyInstance: create)
..a<$core.int>(1, _omitFieldNames ? '' : 'id', $pb.PbFieldType.OU3) ..a<$core.int>(1, _omitFieldNames ? '' : 'id', $pb.PbFieldType.OU3)
..aOS(2, _omitFieldNames ? '' : 'code') ..aOS(2, _omitFieldNames ? '' : 'Iso2', protoName: 'Iso2')
..aOS(3, _omitFieldNames ? '' : 'code3', protoName: 'code_3') ..aOS(3, _omitFieldNames ? '' : 'Iso3', protoName: 'Iso3')
..aOS(4, _omitFieldNames ? '' : 'numCode') ..aOS(4, _omitFieldNames ? '' : 'numCode')
..aOS(5, _omitFieldNames ? '' : 'phoneCode') ..aOS(5, _omitFieldNames ? '' : 'phoneCode')
..aOS(6, _omitFieldNames ? '' : 'name') ..aOS(6, _omitFieldNames ? '' : 'currency')
..aOS(7, _omitFieldNames ? '' : 'localName') ..aOS(7, _omitFieldNames ? '' : 'currencySymbol')
..aOB(8, _omitFieldNames ? '' : 'enabled') ..aOS(8, _omitFieldNames ? '' : 'region')
..a<$core.int>(9, _omitFieldNames ? '' : 'sortOrder', $pb.PbFieldType.O3) ..aOS(9, _omitFieldNames ? '' : 'timezones')
..aOS(10, _omitFieldNames ? '' : 'translations')
..aOS(11, _omitFieldNames ? '' : 'name')
..aOS(12, _omitFieldNames ? '' : 'localName')
..aOB(13, _omitFieldNames ? '' : 'enabled')
..a<$core.int>(14, _omitFieldNames ? '' : 'sortOrder', $pb.PbFieldType.O3)
..hasRequiredFields = false; ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
@ -185,22 +200,22 @@ class CountryItem extends $pb.GeneratedMessage {
void clearId() => $_clearField(1); void clearId() => $_clearField(1);
@$pb.TagNumber(2) @$pb.TagNumber(2)
$core.String get code => $_getSZ(1); $core.String get iso2 => $_getSZ(1);
@$pb.TagNumber(2) @$pb.TagNumber(2)
set code($core.String value) => $_setString(1, value); set iso2($core.String value) => $_setString(1, value);
@$pb.TagNumber(2) @$pb.TagNumber(2)
$core.bool hasCode() => $_has(1); $core.bool hasIso2() => $_has(1);
@$pb.TagNumber(2) @$pb.TagNumber(2)
void clearCode() => $_clearField(2); void clearIso2() => $_clearField(2);
@$pb.TagNumber(3) @$pb.TagNumber(3)
$core.String get code3 => $_getSZ(2); $core.String get iso3 => $_getSZ(2);
@$pb.TagNumber(3) @$pb.TagNumber(3)
set code3($core.String value) => $_setString(2, value); set iso3($core.String value) => $_setString(2, value);
@$pb.TagNumber(3) @$pb.TagNumber(3)
$core.bool hasCode3() => $_has(2); $core.bool hasIso3() => $_has(2);
@$pb.TagNumber(3) @$pb.TagNumber(3)
void clearCode3() => $_clearField(3); void clearIso3() => $_clearField(3);
@$pb.TagNumber(4) @$pb.TagNumber(4)
$core.String get numCode => $_getSZ(3); $core.String get numCode => $_getSZ(3);
@ -221,44 +236,89 @@ class CountryItem extends $pb.GeneratedMessage {
void clearPhoneCode() => $_clearField(5); void clearPhoneCode() => $_clearField(5);
@$pb.TagNumber(6) @$pb.TagNumber(6)
$core.String get name => $_getSZ(5); $core.String get currency => $_getSZ(5);
@$pb.TagNumber(6) @$pb.TagNumber(6)
set name($core.String value) => $_setString(5, value); set currency($core.String value) => $_setString(5, value);
@$pb.TagNumber(6) @$pb.TagNumber(6)
$core.bool hasName() => $_has(5); $core.bool hasCurrency() => $_has(5);
@$pb.TagNumber(6) @$pb.TagNumber(6)
void clearName() => $_clearField(6); void clearCurrency() => $_clearField(6);
@$pb.TagNumber(7) @$pb.TagNumber(7)
$core.String get localName => $_getSZ(6); $core.String get currencySymbol => $_getSZ(6);
@$pb.TagNumber(7) @$pb.TagNumber(7)
set localName($core.String value) => $_setString(6, value); set currencySymbol($core.String value) => $_setString(6, value);
@$pb.TagNumber(7) @$pb.TagNumber(7)
$core.bool hasLocalName() => $_has(6); $core.bool hasCurrencySymbol() => $_has(6);
@$pb.TagNumber(7) @$pb.TagNumber(7)
void clearLocalName() => $_clearField(7); void clearCurrencySymbol() => $_clearField(7);
@$pb.TagNumber(8) @$pb.TagNumber(8)
$core.bool get enabled => $_getBF(7); $core.String get region => $_getSZ(7);
@$pb.TagNumber(8) @$pb.TagNumber(8)
set enabled($core.bool value) => $_setBool(7, value); set region($core.String value) => $_setString(7, value);
@$pb.TagNumber(8) @$pb.TagNumber(8)
$core.bool hasEnabled() => $_has(7); $core.bool hasRegion() => $_has(7);
@$pb.TagNumber(8) @$pb.TagNumber(8)
void clearEnabled() => $_clearField(8); void clearRegion() => $_clearField(8);
@$pb.TagNumber(9) @$pb.TagNumber(9)
$core.int get sortOrder => $_getIZ(8); $core.String get timezones => $_getSZ(8);
@$pb.TagNumber(9) @$pb.TagNumber(9)
set sortOrder($core.int value) => $_setSignedInt32(8, value); set timezones($core.String value) => $_setString(8, value);
@$pb.TagNumber(9) @$pb.TagNumber(9)
$core.bool hasSortOrder() => $_has(8); $core.bool hasTimezones() => $_has(8);
@$pb.TagNumber(9) @$pb.TagNumber(9)
void clearSortOrder() => $_clearField(9); void clearTimezones() => $_clearField(9);
@$pb.TagNumber(10)
$core.String get translations => $_getSZ(9);
@$pb.TagNumber(10)
set translations($core.String value) => $_setString(9, value);
@$pb.TagNumber(10)
$core.bool hasTranslations() => $_has(9);
@$pb.TagNumber(10)
void clearTranslations() => $_clearField(10);
@$pb.TagNumber(11)
$core.String get name => $_getSZ(10);
@$pb.TagNumber(11)
set name($core.String value) => $_setString(10, value);
@$pb.TagNumber(11)
$core.bool hasName() => $_has(10);
@$pb.TagNumber(11)
void clearName() => $_clearField(11);
@$pb.TagNumber(12)
$core.String get localName => $_getSZ(11);
@$pb.TagNumber(12)
set localName($core.String value) => $_setString(11, value);
@$pb.TagNumber(12)
$core.bool hasLocalName() => $_has(11);
@$pb.TagNumber(12)
void clearLocalName() => $_clearField(12);
@$pb.TagNumber(13)
$core.bool get enabled => $_getBF(12);
@$pb.TagNumber(13)
set enabled($core.bool value) => $_setBool(12, value);
@$pb.TagNumber(13)
$core.bool hasEnabled() => $_has(12);
@$pb.TagNumber(13)
void clearEnabled() => $_clearField(13);
@$pb.TagNumber(14)
$core.int get sortOrder => $_getIZ(13);
@$pb.TagNumber(14)
set sortOrder($core.int value) => $_setSignedInt32(13, value);
@$pb.TagNumber(14)
$core.bool hasSortOrder() => $_has(13);
@$pb.TagNumber(14)
void clearSortOrder() => $_clearField(14);
} }
class RegionRequest extends $pb.GeneratedMessage { class AreasRequest extends $pb.GeneratedMessage {
factory RegionRequest({ factory AreasRequest({
$core.int? countryId, $core.int? countryId,
$core.String? countryCode, $core.String? countryCode,
$core.bool? showTown, $core.bool? showTown,
@ -270,17 +330,17 @@ class RegionRequest extends $pb.GeneratedMessage {
return result; return result;
} }
RegionRequest._(); AreasRequest._();
factory RegionRequest.fromBuffer($core.List<$core.int> data, factory AreasRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry); create()..mergeFromBuffer(data, registry);
factory RegionRequest.fromJson($core.String json, factory AreasRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry); create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo( static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'RegionRequest', _omitMessageNames ? '' : 'AreasRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'), package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
createEmptyInstance: create) createEmptyInstance: create)
..a<$core.int>(1, _omitFieldNames ? '' : 'countryId', $pb.PbFieldType.O3) ..a<$core.int>(1, _omitFieldNames ? '' : 'countryId', $pb.PbFieldType.O3)
@ -289,25 +349,25 @@ class RegionRequest extends $pb.GeneratedMessage {
..hasRequiredFields = false; ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
RegionRequest clone() => RegionRequest()..mergeFromMessage(this); AreasRequest clone() => AreasRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
RegionRequest copyWith(void Function(RegionRequest) updates) => AreasRequest copyWith(void Function(AreasRequest) updates) =>
super.copyWith((message) => updates(message as RegionRequest)) super.copyWith((message) => updates(message as AreasRequest))
as RegionRequest; as AreasRequest;
@$core.override @$core.override
$pb.BuilderInfo get info_ => _i; $pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline') @$core.pragma('dart2js:noInline')
static RegionRequest create() => RegionRequest._(); static AreasRequest create() => AreasRequest._();
@$core.override @$core.override
RegionRequest createEmptyInstance() => create(); AreasRequest createEmptyInstance() => create();
static $pb.PbList<RegionRequest> createRepeated() => static $pb.PbList<AreasRequest> createRepeated() =>
$pb.PbList<RegionRequest>(); $pb.PbList<AreasRequest>();
@$core.pragma('dart2js:noInline') @$core.pragma('dart2js:noInline')
static RegionRequest getDefault() => _defaultInstance ??= static AreasRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<RegionRequest>(create); $pb.GeneratedMessage.$_defaultFor<AreasRequest>(create);
static RegionRequest? _defaultInstance; static AreasRequest? _defaultInstance;
/// ID 1 /// ID 1
@$pb.TagNumber(1) @$pb.TagNumber(1)
@ -340,58 +400,57 @@ class RegionRequest extends $pb.GeneratedMessage {
void clearShowTown() => $_clearField(3); void clearShowTown() => $_clearField(3);
} }
class RegionReply extends $pb.GeneratedMessage { class AreasReply extends $pb.GeneratedMessage {
factory RegionReply({ factory AreasReply({
$core.Iterable<RegionItem>? regions, $core.Iterable<AreasItem>? areas,
}) { }) {
final result = create(); final result = create();
if (regions != null) result.regions.addAll(regions); if (areas != null) result.areas.addAll(areas);
return result; return result;
} }
RegionReply._(); AreasReply._();
factory RegionReply.fromBuffer($core.List<$core.int> data, factory AreasReply.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry); create()..mergeFromBuffer(data, registry);
factory RegionReply.fromJson($core.String json, factory AreasReply.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry); create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo( static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'RegionReply', _omitMessageNames ? '' : 'AreasReply',
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'), package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
createEmptyInstance: create) createEmptyInstance: create)
..pc<RegionItem>(1, _omitFieldNames ? '' : 'regions', $pb.PbFieldType.PM, ..pc<AreasItem>(1, _omitFieldNames ? '' : 'areas', $pb.PbFieldType.PM,
subBuilder: RegionItem.create) subBuilder: AreasItem.create)
..hasRequiredFields = false; ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
RegionReply clone() => RegionReply()..mergeFromMessage(this); AreasReply clone() => AreasReply()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
RegionReply copyWith(void Function(RegionReply) updates) => AreasReply copyWith(void Function(AreasReply) updates) =>
super.copyWith((message) => updates(message as RegionReply)) super.copyWith((message) => updates(message as AreasReply)) as AreasReply;
as RegionReply;
@$core.override @$core.override
$pb.BuilderInfo get info_ => _i; $pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline') @$core.pragma('dart2js:noInline')
static RegionReply create() => RegionReply._(); static AreasReply create() => AreasReply._();
@$core.override @$core.override
RegionReply createEmptyInstance() => create(); AreasReply createEmptyInstance() => create();
static $pb.PbList<RegionReply> createRepeated() => $pb.PbList<RegionReply>(); static $pb.PbList<AreasReply> createRepeated() => $pb.PbList<AreasReply>();
@$core.pragma('dart2js:noInline') @$core.pragma('dart2js:noInline')
static RegionReply getDefault() => _defaultInstance ??= static AreasReply getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<RegionReply>(create); $pb.GeneratedMessage.$_defaultFor<AreasReply>(create);
static RegionReply? _defaultInstance; static AreasReply? _defaultInstance;
@$pb.TagNumber(1) @$pb.TagNumber(1)
$pb.PbList<RegionItem> get regions => $_getList(0); $pb.PbList<AreasItem> get areas => $_getList(0);
} }
class RegionItem extends $pb.GeneratedMessage { class AreasItem extends $pb.GeneratedMessage {
factory RegionItem({ factory AreasItem({
$core.String? id, $core.String? id,
$core.String? pid, $core.String? pid,
$core.int? deep, $core.int? deep,
@ -413,17 +472,17 @@ class RegionItem extends $pb.GeneratedMessage {
return result; return result;
} }
RegionItem._(); AreasItem._();
factory RegionItem.fromBuffer($core.List<$core.int> data, factory AreasItem.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry); create()..mergeFromBuffer(data, registry);
factory RegionItem.fromJson($core.String json, factory AreasItem.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry); create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo( static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'RegionItem', _omitMessageNames ? '' : 'AreasItem',
package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'), package: const $pb.PackageName(_omitMessageNames ? '' : 'initial'),
createEmptyInstance: create) createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'id') ..aOS(1, _omitFieldNames ? '' : 'id')
@ -437,23 +496,23 @@ class RegionItem extends $pb.GeneratedMessage {
..hasRequiredFields = false; ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
RegionItem clone() => RegionItem()..mergeFromMessage(this); AreasItem clone() => AreasItem()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
RegionItem copyWith(void Function(RegionItem) updates) => AreasItem copyWith(void Function(AreasItem) updates) =>
super.copyWith((message) => updates(message as RegionItem)) as RegionItem; super.copyWith((message) => updates(message as AreasItem)) as AreasItem;
@$core.override @$core.override
$pb.BuilderInfo get info_ => _i; $pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline') @$core.pragma('dart2js:noInline')
static RegionItem create() => RegionItem._(); static AreasItem create() => AreasItem._();
@$core.override @$core.override
RegionItem createEmptyInstance() => create(); AreasItem createEmptyInstance() => create();
static $pb.PbList<RegionItem> createRepeated() => $pb.PbList<RegionItem>(); static $pb.PbList<AreasItem> createRepeated() => $pb.PbList<AreasItem>();
@$core.pragma('dart2js:noInline') @$core.pragma('dart2js:noInline')
static RegionItem getDefault() => _defaultInstance ??= static AreasItem getDefault() =>
$pb.GeneratedMessage.$_defaultFor<RegionItem>(create); _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<AreasItem>(create);
static RegionItem? _defaultInstance; static AreasItem? _defaultInstance;
@$pb.TagNumber(1) @$pb.TagNumber(1)
$core.String get id => $_getSZ(0); $core.String get id => $_getSZ(0);

View File

@ -41,14 +41,14 @@ class DataClient extends $grpc.Client {
} }
/// , /// ,
$grpc.ResponseFuture<$0.RegionReply> region( $grpc.ResponseFuture<$0.AreasReply> areas(
$0.RegionRequest request, { $0.AreasRequest request, {
$grpc.CallOptions? options, $grpc.CallOptions? options,
}) { }) {
return $createUnaryCall(_$region, request, options: options); return $createUnaryCall(_$areas, request, options: options);
} }
/// ///
$grpc.ResponseFuture<$0.DatasReply> datas( $grpc.ResponseFuture<$0.DatasReply> datas(
$0.Empty request, { $0.Empty request, {
$grpc.CallOptions? options, $grpc.CallOptions? options,
@ -62,10 +62,10 @@ class DataClient extends $grpc.Client {
'/initial.Data/Country', '/initial.Data/Country',
($0.Empty value) => value.writeToBuffer(), ($0.Empty value) => value.writeToBuffer(),
$0.CountryReply.fromBuffer); $0.CountryReply.fromBuffer);
static final _$region = $grpc.ClientMethod<$0.RegionRequest, $0.RegionReply>( static final _$areas = $grpc.ClientMethod<$0.AreasRequest, $0.AreasReply>(
'/initial.Data/Region', '/initial.Data/Areas',
($0.RegionRequest value) => value.writeToBuffer(), ($0.AreasRequest value) => value.writeToBuffer(),
$0.RegionReply.fromBuffer); $0.AreasReply.fromBuffer);
static final _$datas = $grpc.ClientMethod<$0.Empty, $0.DatasReply>( static final _$datas = $grpc.ClientMethod<$0.Empty, $0.DatasReply>(
'/initial.Data/Datas', '/initial.Data/Datas',
($0.Empty value) => value.writeToBuffer(), ($0.Empty value) => value.writeToBuffer(),
@ -84,13 +84,13 @@ abstract class DataServiceBase extends $grpc.Service {
false, false,
($core.List<$core.int> value) => $0.Empty.fromBuffer(value), ($core.List<$core.int> value) => $0.Empty.fromBuffer(value),
($0.CountryReply value) => value.writeToBuffer())); ($0.CountryReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.RegionRequest, $0.RegionReply>( $addMethod($grpc.ServiceMethod<$0.AreasRequest, $0.AreasReply>(
'Region', 'Areas',
region_Pre, areas_Pre,
false, false,
false, false,
($core.List<$core.int> value) => $0.RegionRequest.fromBuffer(value), ($core.List<$core.int> value) => $0.AreasRequest.fromBuffer(value),
($0.RegionReply value) => value.writeToBuffer())); ($0.AreasReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.Empty, $0.DatasReply>( $addMethod($grpc.ServiceMethod<$0.Empty, $0.DatasReply>(
'Datas', 'Datas',
datas_Pre, datas_Pre,
@ -108,13 +108,13 @@ abstract class DataServiceBase extends $grpc.Service {
$async.Future<$0.CountryReply> country( $async.Future<$0.CountryReply> country(
$grpc.ServiceCall call, $0.Empty request); $grpc.ServiceCall call, $0.Empty request);
$async.Future<$0.RegionReply> region_Pre( $async.Future<$0.AreasReply> areas_Pre(
$grpc.ServiceCall $call, $async.Future<$0.RegionRequest> $request) async { $grpc.ServiceCall $call, $async.Future<$0.AreasRequest> $request) async {
return region($call, await $request); return areas($call, await $request);
} }
$async.Future<$0.RegionReply> region( $async.Future<$0.AreasReply> areas(
$grpc.ServiceCall call, $0.RegionRequest request); $grpc.ServiceCall call, $0.AreasRequest request);
$async.Future<$0.DatasReply> datas_Pre( $async.Future<$0.DatasReply> datas_Pre(
$grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async { $grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async {

View File

@ -48,28 +48,36 @@ const CountryItem$json = {
'1': 'CountryItem', '1': 'CountryItem',
'2': [ '2': [
{'1': 'id', '3': 1, '4': 1, '5': 13, '10': 'id'}, {'1': 'id', '3': 1, '4': 1, '5': 13, '10': 'id'},
{'1': 'code', '3': 2, '4': 1, '5': 9, '10': 'code'}, {'1': 'Iso2', '3': 2, '4': 1, '5': 9, '10': 'Iso2'},
{'1': 'code_3', '3': 3, '4': 1, '5': 9, '10': 'code3'}, {'1': 'Iso3', '3': 3, '4': 1, '5': 9, '10': 'Iso3'},
{'1': 'num_code', '3': 4, '4': 1, '5': 9, '10': 'numCode'}, {'1': 'num_code', '3': 4, '4': 1, '5': 9, '10': 'numCode'},
{'1': 'phone_code', '3': 5, '4': 1, '5': 9, '10': 'phoneCode'}, {'1': 'phone_code', '3': 5, '4': 1, '5': 9, '10': 'phoneCode'},
{'1': 'name', '3': 6, '4': 1, '5': 9, '10': 'name'}, {'1': 'currency', '3': 6, '4': 1, '5': 9, '10': 'currency'},
{'1': 'local_name', '3': 7, '4': 1, '5': 9, '10': 'localName'}, {'1': 'currency_symbol', '3': 7, '4': 1, '5': 9, '10': 'currencySymbol'},
{'1': 'enabled', '3': 8, '4': 1, '5': 8, '10': 'enabled'}, {'1': 'region', '3': 8, '4': 1, '5': 9, '10': 'region'},
{'1': 'sort_order', '3': 9, '4': 1, '5': 5, '10': 'sortOrder'}, {'1': 'timezones', '3': 9, '4': 1, '5': 9, '10': 'timezones'},
{'1': 'translations', '3': 10, '4': 1, '5': 9, '10': 'translations'},
{'1': 'name', '3': 11, '4': 1, '5': 9, '10': 'name'},
{'1': 'local_name', '3': 12, '4': 1, '5': 9, '10': 'localName'},
{'1': 'enabled', '3': 13, '4': 1, '5': 8, '10': 'enabled'},
{'1': 'sort_order', '3': 14, '4': 1, '5': 5, '10': 'sortOrder'},
], ],
}; };
/// Descriptor for `CountryItem`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `CountryItem`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List countryItemDescriptor = $convert.base64Decode( final $typed_data.Uint8List countryItemDescriptor = $convert.base64Decode(
'CgtDb3VudHJ5SXRlbRIOCgJpZBgBIAEoDVICaWQSEgoEY29kZRgCIAEoCVIEY29kZRIVCgZjb2' 'CgtDb3VudHJ5SXRlbRIOCgJpZBgBIAEoDVICaWQSEgoESXNvMhgCIAEoCVIESXNvMhISCgRJc2'
'RlXzMYAyABKAlSBWNvZGUzEhkKCG51bV9jb2RlGAQgASgJUgdudW1Db2RlEh0KCnBob25lX2Nv' '8zGAMgASgJUgRJc28zEhkKCG51bV9jb2RlGAQgASgJUgdudW1Db2RlEh0KCnBob25lX2NvZGUY'
'ZGUYBSABKAlSCXBob25lQ29kZRISCgRuYW1lGAYgASgJUgRuYW1lEh0KCmxvY2FsX25hbWUYBy' 'BSABKAlSCXBob25lQ29kZRIaCghjdXJyZW5jeRgGIAEoCVIIY3VycmVuY3kSJwoPY3VycmVuY3'
'ABKAlSCWxvY2FsTmFtZRIYCgdlbmFibGVkGAggASgIUgdlbmFibGVkEh0KCnNvcnRfb3JkZXIY' 'lfc3ltYm9sGAcgASgJUg5jdXJyZW5jeVN5bWJvbBIWCgZyZWdpb24YCCABKAlSBnJlZ2lvbhIc'
'CSABKAVSCXNvcnRPcmRlcg=='); 'Cgl0aW1lem9uZXMYCSABKAlSCXRpbWV6b25lcxIiCgx0cmFuc2xhdGlvbnMYCiABKAlSDHRyYW'
'5zbGF0aW9ucxISCgRuYW1lGAsgASgJUgRuYW1lEh0KCmxvY2FsX25hbWUYDCABKAlSCWxvY2Fs'
'TmFtZRIYCgdlbmFibGVkGA0gASgIUgdlbmFibGVkEh0KCnNvcnRfb3JkZXIYDiABKAVSCXNvcn'
'RPcmRlcg==');
@$core.Deprecated('Use regionRequestDescriptor instead') @$core.Deprecated('Use areasRequestDescriptor instead')
const RegionRequest$json = { const AreasRequest$json = {
'1': 'RegionRequest', '1': 'AreasRequest',
'2': [ '2': [
{'1': 'country_id', '3': 1, '4': 1, '5': 5, '10': 'countryId'}, {'1': 'country_id', '3': 1, '4': 1, '5': 5, '10': 'countryId'},
{'1': 'country_code', '3': 2, '4': 1, '5': 9, '10': 'countryCode'}, {'1': 'country_code', '3': 2, '4': 1, '5': 9, '10': 'countryCode'},
@ -77,34 +85,33 @@ const RegionRequest$json = {
], ],
}; };
/// Descriptor for `RegionRequest`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `AreasRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List regionRequestDescriptor = $convert.base64Decode( final $typed_data.Uint8List areasRequestDescriptor = $convert.base64Decode(
'Cg1SZWdpb25SZXF1ZXN0Eh0KCmNvdW50cnlfaWQYASABKAVSCWNvdW50cnlJZBIhCgxjb3VudH' 'CgxBcmVhc1JlcXVlc3QSHQoKY291bnRyeV9pZBgBIAEoBVIJY291bnRyeUlkEiEKDGNvdW50cn'
'J5X2NvZGUYAiABKAlSC2NvdW50cnlDb2RlEhsKCXNob3dfdG93bhgDIAEoCFIIc2hvd1Rvd24='); 'lfY29kZRgCIAEoCVILY291bnRyeUNvZGUSGwoJc2hvd190b3duGAMgASgIUghzaG93VG93bg==');
@$core.Deprecated('Use regionReplyDescriptor instead') @$core.Deprecated('Use areasReplyDescriptor instead')
const RegionReply$json = { const AreasReply$json = {
'1': 'RegionReply', '1': 'AreasReply',
'2': [ '2': [
{ {
'1': 'regions', '1': 'areas',
'3': 1, '3': 1,
'4': 3, '4': 3,
'5': 11, '5': 11,
'6': '.initial.RegionItem', '6': '.initial.AreasItem',
'10': 'regions' '10': 'areas'
}, },
], ],
}; };
/// Descriptor for `RegionReply`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `AreasReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List regionReplyDescriptor = $convert.base64Decode( final $typed_data.Uint8List areasReplyDescriptor = $convert.base64Decode(
'CgtSZWdpb25SZXBseRItCgdyZWdpb25zGAEgAygLMhMuaW5pdGlhbC5SZWdpb25JdGVtUgdyZW' 'CgpBcmVhc1JlcGx5EigKBWFyZWFzGAEgAygLMhIuaW5pdGlhbC5BcmVhc0l0ZW1SBWFyZWFz');
'dpb25z');
@$core.Deprecated('Use regionItemDescriptor instead') @$core.Deprecated('Use areasItemDescriptor instead')
const RegionItem$json = { const AreasItem$json = {
'1': 'RegionItem', '1': 'AreasItem',
'2': [ '2': [
{'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
{'1': 'pid', '3': 2, '4': 1, '5': 9, '10': 'pid'}, {'1': 'pid', '3': 2, '4': 1, '5': 9, '10': 'pid'},
@ -117,12 +124,12 @@ const RegionItem$json = {
], ],
}; };
/// Descriptor for `RegionItem`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `AreasItem`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List regionItemDescriptor = $convert.base64Decode( final $typed_data.Uint8List areasItemDescriptor = $convert.base64Decode(
'CgpSZWdpb25JdGVtEg4KAmlkGAEgASgJUgJpZBIQCgNwaWQYAiABKAlSA3BpZBISCgRkZWVwGA' 'CglBcmVhc0l0ZW0SDgoCaWQYASABKAlSAmlkEhAKA3BpZBgCIAEoCVIDcGlkEhIKBGRlZXAYAy'
'MgASgFUgRkZWVwEhIKBG5hbWUYBCABKAlSBG5hbWUSIwoNcGlueWluX3ByZWZpeBgFIAEoCVIM' 'ABKAVSBGRlZXASEgoEbmFtZRgEIAEoCVIEbmFtZRIjCg1waW55aW5fcHJlZml4GAUgASgJUgxw'
'cGlueWluUHJlZml4EhYKBnBpbnlpbhgGIAEoCVIGcGlueWluEhUKBmV4dF9pZBgHIAEoCVIFZX' 'aW55aW5QcmVmaXgSFgoGcGlueWluGAYgASgJUgZwaW55aW4SFQoGZXh0X2lkGAcgASgJUgVleH'
'h0SWQSGQoIZXh0X25hbWUYCCABKAlSB2V4dE5hbWU='); 'RJZBIZCghleHRfbmFtZRgIIAEoCVIHZXh0TmFtZQ==');
@$core.Deprecated('Use datasReplyDescriptor instead') @$core.Deprecated('Use datasReplyDescriptor instead')
const DatasReply$json = { const DatasReply$json = {

View File

@ -3,7 +3,7 @@
initial-数据 initial-数据
- [/initial.Data/Country](#initialdatacountry) - [/initial.Data/Country](#initialdatacountry)
- [/initial.Data/Region](#initialdataregion) - [/initial.Data/Areas](#initialdataareas)
- [/initial.Data/Datas](#initialdatadatas) - [/initial.Data/Datas](#initialdatadatas)
## /initial.Data/Country ## /initial.Data/Country
@ -20,10 +20,15 @@
{ {
countries: [{ countries: [{
id: 0, // type<uint32> id: 0, // type<uint32>
code: "", // type<string> Iso2: "", // type<string>
code_3: "", // type<string> Iso3: "", // type<string>
num_code: "", // type<string> num_code: "", // type<string>
phone_code: "", // type<string> phone_code: "", // type<string>
currency: "", // type<string>
currency_symbol: "", // type<string>
region: "", // type<string>
timezones: "", // type<string>
translations: "", // type<string>
name: "", // type<string> name: "", // type<string>
local_name: "", // type<string> local_name: "", // type<string>
enabled: false, // type<bool> enabled: false, // type<bool>
@ -31,7 +36,7 @@
}], // list<CountryItem> }], // list<CountryItem>
} }
``` ```
## /initial.Data/Region ## /initial.Data/Areas
系统区域数据,默认级别:市 系统区域数据,默认级别:市
@ -51,7 +56,7 @@
### Reply ### Reply
```javascript ```javascript
{ {
regions: [{ areas: [{
id: "", // type<string> id: "", // type<string>
pid: "", // type<string> pid: "", // type<string>
deep: 0, // type<int32> deep: 0, // type<int32>
@ -60,12 +65,12 @@
pinyin: "", // type<string> pinyin: "", // type<string>
ext_id: "", // type<string> ext_id: "", // type<string>
ext_name: "", // type<string> ext_name: "", // type<string>
}], // list<RegionItem> }], // list<AreasItem>
} }
``` ```
## /initial.Data/Datas ## /initial.Data/Datas
系统标签数据 系统数据
### Request ### Request

View File

@ -20,6 +20,48 @@
], ],
"paths": {}, "paths": {},
"definitions": { "definitions": {
"initialAreasItem": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"pid": {
"type": "string"
},
"deep": {
"type": "integer",
"format": "int32"
},
"name": {
"type": "string"
},
"pinyinPrefix": {
"type": "string"
},
"pinyin": {
"type": "string"
},
"extId": {
"type": "string"
},
"extName": {
"type": "string"
}
}
},
"initialAreasReply": {
"type": "object",
"properties": {
"areas": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/initialAreasItem"
}
}
}
},
"initialCheckForUpdatesReply": { "initialCheckForUpdatesReply": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -87,10 +129,10 @@
"type": "integer", "type": "integer",
"format": "int64" "format": "int64"
}, },
"code": { "Iso2": {
"type": "string" "type": "string"
}, },
"code3": { "Iso3": {
"type": "string" "type": "string"
}, },
"numCode": { "numCode": {
@ -99,6 +141,21 @@
"phoneCode": { "phoneCode": {
"type": "string" "type": "string"
}, },
"currency": {
"type": "string"
},
"currencySymbol": {
"type": "string"
},
"region": {
"type": "string"
},
"timezones": {
"type": "string"
},
"translations": {
"type": "string"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
@ -162,48 +219,6 @@
} }
} }
}, },
"initialRegionItem": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"pid": {
"type": "string"
},
"deep": {
"type": "integer",
"format": "int32"
},
"name": {
"type": "string"
},
"pinyinPrefix": {
"type": "string"
},
"pinyin": {
"type": "string"
},
"extId": {
"type": "string"
},
"extName": {
"type": "string"
}
}
},
"initialRegionReply": {
"type": "object",
"properties": {
"regions": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/initialRegionItem"
}
}
}
},
"initialStatusReply": { "initialStatusReply": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -102,18 +102,23 @@ func (x *CountryReply) GetCountries() []*CountryItem {
} }
type CountryItem struct { type CountryItem struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` Iso2 string `protobuf:"bytes,2,opt,name=Iso2,proto3" json:"Iso2,omitempty"`
Code_3 string `protobuf:"bytes,3,opt,name=code_3,json=code3,proto3" json:"code_3,omitempty"` Iso3 string `protobuf:"bytes,3,opt,name=Iso3,proto3" json:"Iso3,omitempty"`
NumCode string `protobuf:"bytes,4,opt,name=num_code,json=numCode,proto3" json:"num_code,omitempty"` NumCode string `protobuf:"bytes,4,opt,name=num_code,json=numCode,proto3" json:"num_code,omitempty"`
PhoneCode string `protobuf:"bytes,5,opt,name=phone_code,json=phoneCode,proto3" json:"phone_code,omitempty"` PhoneCode string `protobuf:"bytes,5,opt,name=phone_code,json=phoneCode,proto3" json:"phone_code,omitempty"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` Currency string `protobuf:"bytes,6,opt,name=currency,proto3" json:"currency,omitempty"`
LocalName string `protobuf:"bytes,7,opt,name=local_name,json=localName,proto3" json:"local_name,omitempty"` CurrencySymbol string `protobuf:"bytes,7,opt,name=currency_symbol,json=currencySymbol,proto3" json:"currency_symbol,omitempty"`
Enabled bool `protobuf:"varint,8,opt,name=enabled,proto3" json:"enabled,omitempty"` Region string `protobuf:"bytes,8,opt,name=region,proto3" json:"region,omitempty"`
SortOrder int32 `protobuf:"varint,9,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"` Timezones string `protobuf:"bytes,9,opt,name=timezones,proto3" json:"timezones,omitempty"`
unknownFields protoimpl.UnknownFields Translations string `protobuf:"bytes,10,opt,name=translations,proto3" json:"translations,omitempty"`
sizeCache protoimpl.SizeCache Name string `protobuf:"bytes,11,opt,name=name,proto3" json:"name,omitempty"`
LocalName string `protobuf:"bytes,12,opt,name=local_name,json=localName,proto3" json:"local_name,omitempty"`
Enabled bool `protobuf:"varint,13,opt,name=enabled,proto3" json:"enabled,omitempty"`
SortOrder int32 `protobuf:"varint,14,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *CountryItem) Reset() { func (x *CountryItem) Reset() {
@ -153,16 +158,16 @@ func (x *CountryItem) GetId() uint32 {
return 0 return 0
} }
func (x *CountryItem) GetCode() string { func (x *CountryItem) GetIso2() string {
if x != nil { if x != nil {
return x.Code return x.Iso2
} }
return "" return ""
} }
func (x *CountryItem) GetCode_3() string { func (x *CountryItem) GetIso3() string {
if x != nil { if x != nil {
return x.Code_3 return x.Iso3
} }
return "" return ""
} }
@ -181,6 +186,41 @@ func (x *CountryItem) GetPhoneCode() string {
return "" return ""
} }
func (x *CountryItem) GetCurrency() string {
if x != nil {
return x.Currency
}
return ""
}
func (x *CountryItem) GetCurrencySymbol() string {
if x != nil {
return x.CurrencySymbol
}
return ""
}
func (x *CountryItem) GetRegion() string {
if x != nil {
return x.Region
}
return ""
}
func (x *CountryItem) GetTimezones() string {
if x != nil {
return x.Timezones
}
return ""
}
func (x *CountryItem) GetTranslations() string {
if x != nil {
return x.Translations
}
return ""
}
func (x *CountryItem) GetName() string { func (x *CountryItem) GetName() string {
if x != nil { if x != nil {
return x.Name return x.Name
@ -209,7 +249,7 @@ func (x *CountryItem) GetSortOrder() int32 {
return 0 return 0
} }
type RegionRequest struct { type AreasRequest struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
// 国家ID默认中国 1 // 国家ID默认中国 1
CountryId int32 `protobuf:"varint,1,opt,name=country_id,json=countryId,proto3" json:"country_id,omitempty"` CountryId int32 `protobuf:"varint,1,opt,name=country_id,json=countryId,proto3" json:"country_id,omitempty"`
@ -221,20 +261,20 @@ type RegionRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *RegionRequest) Reset() { func (x *AreasRequest) Reset() {
*x = RegionRequest{} *x = AreasRequest{}
mi := &file_data_proto_msgTypes[3] mi := &file_data_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *RegionRequest) String() string { func (x *AreasRequest) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*RegionRequest) ProtoMessage() {} func (*AreasRequest) ProtoMessage() {}
func (x *RegionRequest) ProtoReflect() protoreflect.Message { func (x *AreasRequest) ProtoReflect() protoreflect.Message {
mi := &file_data_proto_msgTypes[3] mi := &file_data_proto_msgTypes[3]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -246,53 +286,53 @@ func (x *RegionRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use RegionRequest.ProtoReflect.Descriptor instead. // Deprecated: Use AreasRequest.ProtoReflect.Descriptor instead.
func (*RegionRequest) Descriptor() ([]byte, []int) { func (*AreasRequest) Descriptor() ([]byte, []int) {
return file_data_proto_rawDescGZIP(), []int{3} return file_data_proto_rawDescGZIP(), []int{3}
} }
func (x *RegionRequest) GetCountryId() int32 { func (x *AreasRequest) GetCountryId() int32 {
if x != nil { if x != nil {
return x.CountryId return x.CountryId
} }
return 0 return 0
} }
func (x *RegionRequest) GetCountryCode() string { func (x *AreasRequest) GetCountryCode() string {
if x != nil { if x != nil {
return x.CountryCode return x.CountryCode
} }
return "" return ""
} }
func (x *RegionRequest) GetShowTown() bool { func (x *AreasRequest) GetShowTown() bool {
if x != nil { if x != nil {
return x.ShowTown return x.ShowTown
} }
return false return false
} }
type RegionReply struct { type AreasReply struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Regions []*RegionItem `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"` Areas []*AreasItem `protobuf:"bytes,1,rep,name=areas,proto3" json:"areas,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *RegionReply) Reset() { func (x *AreasReply) Reset() {
*x = RegionReply{} *x = AreasReply{}
mi := &file_data_proto_msgTypes[4] mi := &file_data_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *RegionReply) String() string { func (x *AreasReply) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*RegionReply) ProtoMessage() {} func (*AreasReply) ProtoMessage() {}
func (x *RegionReply) ProtoReflect() protoreflect.Message { func (x *AreasReply) ProtoReflect() protoreflect.Message {
mi := &file_data_proto_msgTypes[4] mi := &file_data_proto_msgTypes[4]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -304,19 +344,19 @@ func (x *RegionReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use RegionReply.ProtoReflect.Descriptor instead. // Deprecated: Use AreasReply.ProtoReflect.Descriptor instead.
func (*RegionReply) Descriptor() ([]byte, []int) { func (*AreasReply) Descriptor() ([]byte, []int) {
return file_data_proto_rawDescGZIP(), []int{4} return file_data_proto_rawDescGZIP(), []int{4}
} }
func (x *RegionReply) GetRegions() []*RegionItem { func (x *AreasReply) GetAreas() []*AreasItem {
if x != nil { if x != nil {
return x.Regions return x.Areas
} }
return nil return nil
} }
type RegionItem struct { type AreasItem struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"`
@ -330,20 +370,20 @@ type RegionItem struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *RegionItem) Reset() { func (x *AreasItem) Reset() {
*x = RegionItem{} *x = AreasItem{}
mi := &file_data_proto_msgTypes[5] mi := &file_data_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
func (x *RegionItem) String() string { func (x *AreasItem) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*RegionItem) ProtoMessage() {} func (*AreasItem) ProtoMessage() {}
func (x *RegionItem) ProtoReflect() protoreflect.Message { func (x *AreasItem) ProtoReflect() protoreflect.Message {
mi := &file_data_proto_msgTypes[5] mi := &file_data_proto_msgTypes[5]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -355,61 +395,61 @@ func (x *RegionItem) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use RegionItem.ProtoReflect.Descriptor instead. // Deprecated: Use AreasItem.ProtoReflect.Descriptor instead.
func (*RegionItem) Descriptor() ([]byte, []int) { func (*AreasItem) Descriptor() ([]byte, []int) {
return file_data_proto_rawDescGZIP(), []int{5} return file_data_proto_rawDescGZIP(), []int{5}
} }
func (x *RegionItem) GetId() string { func (x *AreasItem) GetId() string {
if x != nil { if x != nil {
return x.Id return x.Id
} }
return "" return ""
} }
func (x *RegionItem) GetPid() string { func (x *AreasItem) GetPid() string {
if x != nil { if x != nil {
return x.Pid return x.Pid
} }
return "" return ""
} }
func (x *RegionItem) GetDeep() int32 { func (x *AreasItem) GetDeep() int32 {
if x != nil { if x != nil {
return x.Deep return x.Deep
} }
return 0 return 0
} }
func (x *RegionItem) GetName() string { func (x *AreasItem) GetName() string {
if x != nil { if x != nil {
return x.Name return x.Name
} }
return "" return ""
} }
func (x *RegionItem) GetPinyinPrefix() string { func (x *AreasItem) GetPinyinPrefix() string {
if x != nil { if x != nil {
return x.PinyinPrefix return x.PinyinPrefix
} }
return "" return ""
} }
func (x *RegionItem) GetPinyin() string { func (x *AreasItem) GetPinyin() string {
if x != nil { if x != nil {
return x.Pinyin return x.Pinyin
} }
return "" return ""
} }
func (x *RegionItem) GetExtId() string { func (x *AreasItem) GetExtId() string {
if x != nil { if x != nil {
return x.ExtId return x.ExtId
} }
return "" return ""
} }
func (x *RegionItem) GetExtName() string { func (x *AreasItem) GetExtName() string {
if x != nil { if x != nil {
return x.ExtName return x.ExtName
} }
@ -552,29 +592,35 @@ const file_data_proto_rawDesc = "" +
"data.proto\x12\ainitial\"\a\n" + "data.proto\x12\ainitial\"\a\n" +
"\x05Empty\"B\n" + "\x05Empty\"B\n" +
"\fCountryReply\x122\n" + "\fCountryReply\x122\n" +
"\tcountries\x18\x01 \x03(\v2\x14.initial.CountryItemR\tcountries\"\xee\x01\n" + "\tcountries\x18\x01 \x03(\v2\x14.initial.CountryItemR\tcountries\"\x8a\x03\n" +
"\vCountryItem\x12\x0e\n" + "\vCountryItem\x12\x0e\n" +
"\x02id\x18\x01 \x01(\rR\x02id\x12\x12\n" + "\x02id\x18\x01 \x01(\rR\x02id\x12\x12\n" +
"\x04code\x18\x02 \x01(\tR\x04code\x12\x15\n" + "\x04Iso2\x18\x02 \x01(\tR\x04Iso2\x12\x12\n" +
"\x06code_3\x18\x03 \x01(\tR\x05code3\x12\x19\n" + "\x04Iso3\x18\x03 \x01(\tR\x04Iso3\x12\x19\n" +
"\bnum_code\x18\x04 \x01(\tR\anumCode\x12\x1d\n" + "\bnum_code\x18\x04 \x01(\tR\anumCode\x12\x1d\n" +
"\n" + "\n" +
"phone_code\x18\x05 \x01(\tR\tphoneCode\x12\x12\n" + "phone_code\x18\x05 \x01(\tR\tphoneCode\x12\x1a\n" +
"\x04name\x18\x06 \x01(\tR\x04name\x12\x1d\n" + "\bcurrency\x18\x06 \x01(\tR\bcurrency\x12'\n" +
"\x0fcurrency_symbol\x18\a \x01(\tR\x0ecurrencySymbol\x12\x16\n" +
"\x06region\x18\b \x01(\tR\x06region\x12\x1c\n" +
"\ttimezones\x18\t \x01(\tR\ttimezones\x12\"\n" +
"\ftranslations\x18\n" +
" \x01(\tR\ftranslations\x12\x12\n" +
"\x04name\x18\v \x01(\tR\x04name\x12\x1d\n" +
"\n" + "\n" +
"local_name\x18\a \x01(\tR\tlocalName\x12\x18\n" + "local_name\x18\f \x01(\tR\tlocalName\x12\x18\n" +
"\aenabled\x18\b \x01(\bR\aenabled\x12\x1d\n" + "\aenabled\x18\r \x01(\bR\aenabled\x12\x1d\n" +
"\n" + "\n" +
"sort_order\x18\t \x01(\x05R\tsortOrder\"n\n" + "sort_order\x18\x0e \x01(\x05R\tsortOrder\"m\n" +
"\rRegionRequest\x12\x1d\n" + "\fAreasRequest\x12\x1d\n" +
"\n" + "\n" +
"country_id\x18\x01 \x01(\x05R\tcountryId\x12!\n" + "country_id\x18\x01 \x01(\x05R\tcountryId\x12!\n" +
"\fcountry_code\x18\x02 \x01(\tR\vcountryCode\x12\x1b\n" + "\fcountry_code\x18\x02 \x01(\tR\vcountryCode\x12\x1b\n" +
"\tshow_town\x18\x03 \x01(\bR\bshowTown\"<\n" + "\tshow_town\x18\x03 \x01(\bR\bshowTown\"6\n" +
"\vRegionReply\x12-\n" +
"\aregions\x18\x01 \x03(\v2\x13.initial.RegionItemR\aregions\"\xc5\x01\n" +
"\n" + "\n" +
"RegionItem\x12\x0e\n" + "AreasReply\x12(\n" +
"\x05areas\x18\x01 \x03(\v2\x12.initial.AreasItemR\x05areas\"\xc4\x01\n" +
"\tAreasItem\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x10\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x10\n" +
"\x03pid\x18\x02 \x01(\tR\x03pid\x12\x12\n" + "\x03pid\x18\x02 \x01(\tR\x03pid\x12\x12\n" +
"\x04deep\x18\x03 \x01(\x05R\x04deep\x12\x12\n" + "\x04deep\x18\x03 \x01(\x05R\x04deep\x12\x12\n" +
@ -592,10 +638,10 @@ const file_data_proto_rawDesc = "" +
"\x03key\x18\x03 \x01(\tR\x03key\x12\x14\n" + "\x03key\x18\x03 \x01(\tR\x03key\x12\x14\n" +
"\x05title\x18\x04 \x01(\tR\x05title\x12\x16\n" + "\x05title\x18\x04 \x01(\tR\x05title\x12\x16\n" +
"\x06remark\x18\x05 \x01(\tR\x06remark\x12\x12\n" + "\x06remark\x18\x05 \x01(\tR\x06remark\x12\x12\n" +
"\x04icon\x18\x06 \x01(\tR\x04icon2\xa4\x01\n" + "\x04icon\x18\x06 \x01(\tR\x04icon2\xa1\x01\n" +
"\x04Data\x122\n" + "\x04Data\x122\n" +
"\aCountry\x12\x0e.initial.Empty\x1a\x15.initial.CountryReply\"\x00\x128\n" + "\aCountry\x12\x0e.initial.Empty\x1a\x15.initial.CountryReply\"\x00\x125\n" +
"\x06Region\x12\x16.initial.RegionRequest\x1a\x14.initial.RegionReply\"\x00\x12.\n" + "\x05Areas\x12\x15.initial.AreasRequest\x1a\x13.initial.AreasReply\"\x00\x12.\n" +
"\x05Datas\x12\x0e.initial.Empty\x1a\x13.initial.DatasReply\"\x00B\vZ\t.;initialb\x06proto3" "\x05Datas\x12\x0e.initial.Empty\x1a\x13.initial.DatasReply\"\x00B\vZ\t.;initialb\x06proto3"
var ( var (
@ -612,24 +658,24 @@ func file_data_proto_rawDescGZIP() []byte {
var file_data_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_data_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_data_proto_goTypes = []any{ var file_data_proto_goTypes = []any{
(*Empty)(nil), // 0: initial.Empty (*Empty)(nil), // 0: initial.Empty
(*CountryReply)(nil), // 1: initial.CountryReply (*CountryReply)(nil), // 1: initial.CountryReply
(*CountryItem)(nil), // 2: initial.CountryItem (*CountryItem)(nil), // 2: initial.CountryItem
(*RegionRequest)(nil), // 3: initial.RegionRequest (*AreasRequest)(nil), // 3: initial.AreasRequest
(*RegionReply)(nil), // 4: initial.RegionReply (*AreasReply)(nil), // 4: initial.AreasReply
(*RegionItem)(nil), // 5: initial.RegionItem (*AreasItem)(nil), // 5: initial.AreasItem
(*DatasReply)(nil), // 6: initial.DatasReply (*DatasReply)(nil), // 6: initial.DatasReply
(*DatasItem)(nil), // 7: initial.DatasItem (*DatasItem)(nil), // 7: initial.DatasItem
} }
var file_data_proto_depIdxs = []int32{ var file_data_proto_depIdxs = []int32{
2, // 0: initial.CountryReply.countries:type_name -> initial.CountryItem 2, // 0: initial.CountryReply.countries:type_name -> initial.CountryItem
5, // 1: initial.RegionReply.regions:type_name -> initial.RegionItem 5, // 1: initial.AreasReply.areas:type_name -> initial.AreasItem
7, // 2: initial.DatasReply.datas:type_name -> initial.DatasItem 7, // 2: initial.DatasReply.datas:type_name -> initial.DatasItem
0, // 3: initial.Data.Country:input_type -> initial.Empty 0, // 3: initial.Data.Country:input_type -> initial.Empty
3, // 4: initial.Data.Region:input_type -> initial.RegionRequest 3, // 4: initial.Data.Areas:input_type -> initial.AreasRequest
0, // 5: initial.Data.Datas:input_type -> initial.Empty 0, // 5: initial.Data.Datas:input_type -> initial.Empty
1, // 6: initial.Data.Country:output_type -> initial.CountryReply 1, // 6: initial.Data.Country:output_type -> initial.CountryReply
4, // 7: initial.Data.Region:output_type -> initial.RegionReply 4, // 7: initial.Data.Areas:output_type -> initial.AreasReply
6, // 8: initial.Data.Datas:output_type -> initial.DatasReply 6, // 8: initial.Data.Datas:output_type -> initial.DatasReply
6, // [6:9] is the sub-list for method output_type 6, // [6:9] is the sub-list for method output_type
3, // [3:6] is the sub-list for method input_type 3, // [3:6] is the sub-list for method input_type

View File

@ -20,7 +20,7 @@ const _ = grpc.SupportPackageIsVersion9
const ( const (
Data_Country_FullMethodName = "/initial.Data/Country" Data_Country_FullMethodName = "/initial.Data/Country"
Data_Region_FullMethodName = "/initial.Data/Region" Data_Areas_FullMethodName = "/initial.Data/Areas"
Data_Datas_FullMethodName = "/initial.Data/Datas" Data_Datas_FullMethodName = "/initial.Data/Datas"
) )
@ -32,8 +32,8 @@ const (
type DataClient interface { type DataClient interface {
Country(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CountryReply, error) Country(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CountryReply, error)
// 系统区域数据,默认级别:市 // 系统区域数据,默认级别:市
Region(ctx context.Context, in *RegionRequest, opts ...grpc.CallOption) (*RegionReply, error) Areas(ctx context.Context, in *AreasRequest, opts ...grpc.CallOption) (*AreasReply, error)
// 系统标签数据 // 系统数据
Datas(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DatasReply, error) Datas(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DatasReply, error)
} }
@ -55,10 +55,10 @@ func (c *dataClient) Country(ctx context.Context, in *Empty, opts ...grpc.CallOp
return out, nil return out, nil
} }
func (c *dataClient) Region(ctx context.Context, in *RegionRequest, opts ...grpc.CallOption) (*RegionReply, error) { func (c *dataClient) Areas(ctx context.Context, in *AreasRequest, opts ...grpc.CallOption) (*AreasReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegionReply) out := new(AreasReply)
err := c.cc.Invoke(ctx, Data_Region_FullMethodName, in, out, cOpts...) err := c.cc.Invoke(ctx, Data_Areas_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -83,8 +83,8 @@ func (c *dataClient) Datas(ctx context.Context, in *Empty, opts ...grpc.CallOpti
type DataServer interface { type DataServer interface {
Country(context.Context, *Empty) (*CountryReply, error) Country(context.Context, *Empty) (*CountryReply, error)
// 系统区域数据,默认级别:市 // 系统区域数据,默认级别:市
Region(context.Context, *RegionRequest) (*RegionReply, error) Areas(context.Context, *AreasRequest) (*AreasReply, error)
// 系统标签数据 // 系统数据
Datas(context.Context, *Empty) (*DatasReply, error) Datas(context.Context, *Empty) (*DatasReply, error)
mustEmbedUnimplementedDataServer() mustEmbedUnimplementedDataServer()
} }
@ -99,8 +99,8 @@ type UnimplementedDataServer struct{}
func (UnimplementedDataServer) Country(context.Context, *Empty) (*CountryReply, error) { func (UnimplementedDataServer) Country(context.Context, *Empty) (*CountryReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Country not implemented") return nil, status.Errorf(codes.Unimplemented, "method Country not implemented")
} }
func (UnimplementedDataServer) Region(context.Context, *RegionRequest) (*RegionReply, error) { func (UnimplementedDataServer) Areas(context.Context, *AreasRequest) (*AreasReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Region not implemented") return nil, status.Errorf(codes.Unimplemented, "method Areas not implemented")
} }
func (UnimplementedDataServer) Datas(context.Context, *Empty) (*DatasReply, error) { func (UnimplementedDataServer) Datas(context.Context, *Empty) (*DatasReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Datas not implemented") return nil, status.Errorf(codes.Unimplemented, "method Datas not implemented")
@ -144,20 +144,20 @@ func _Data_Country_Handler(srv interface{}, ctx context.Context, dec func(interf
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Data_Region_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Data_Areas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegionRequest) in := new(AreasRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(DataServer).Region(ctx, in) return srv.(DataServer).Areas(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: Data_Region_FullMethodName, FullMethod: Data_Areas_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DataServer).Region(ctx, req.(*RegionRequest)) return srv.(DataServer).Areas(ctx, req.(*AreasRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -192,8 +192,8 @@ var Data_ServiceDesc = grpc.ServiceDesc{
Handler: _Data_Country_Handler, Handler: _Data_Country_Handler,
}, },
{ {
MethodName: "Region", MethodName: "Areas",
Handler: _Data_Region_Handler, Handler: _Data_Areas_Handler,
}, },
{ {
MethodName: "Datas", MethodName: "Datas",

View File

@ -91,17 +91,22 @@ export type CountryReply = {
export type CountryItem = { export type CountryItem = {
id?: number; id?: number;
code?: string; Iso2?: string;
code3?: string; Iso3?: string;
numCode?: string; numCode?: string;
phoneCode?: string; phoneCode?: string;
currency?: string;
currencySymbol?: string;
region?: string;
timezones?: string;
translations?: string;
name?: string; name?: string;
localName?: string; localName?: string;
enabled?: boolean; enabled?: boolean;
sortOrder?: number; sortOrder?: number;
}; };
export type RegionRequest = { export type AreasRequest = {
/** 国家ID默认中国 1 */ /** 国家ID默认中国 1 */
countryId?: number; countryId?: number;
/** 国家代码,默认:中国 CN */ /** 国家代码,默认:中国 CN */
@ -110,11 +115,11 @@ export type RegionRequest = {
showTown?: boolean; showTown?: boolean;
}; };
export type RegionReply = { export type AreasReply = {
regions?: RegionItem[]; areas?: AreasItem[];
}; };
export type RegionItem = { export type AreasItem = {
id?: string; id?: string;
pid?: string; pid?: string;
deep?: number; deep?: number;