syntax = "proto3";
option go_package = "./pb";

package pb;

import "models/model_region_country.proto";
import "models/model_region_province.proto";

// 省份月份统计
service ServerRegionProvinceMonthlyStatService {
	// 查找前N个省份
	rpc findTopServerRegionProvinceMonthlyStats (FindTopServerRegionProvinceMonthlyStatsRequest) returns (FindTopServerRegionProvinceMonthlyStatsResponse);
}

// 查找前N个城市
message FindTopServerRegionProvinceMonthlyStatsRequest {
	string month = 1; // YYYYMM
	int64 serverId = 2;
	int64 countryId = 3;
	int64 offset = 4;
	int64 size = 5;
}

message FindTopServerRegionProvinceMonthlyStatsResponse {
	repeated Stat stats = 1;

	message Stat {
		RegionCountry regionCountry = 1;
		RegionProvince regionProvince = 2;
		int64 count = 3;
	}
}