using System.Text.Json.Serialization; namespace StopShopping.OpenPlatform.TencentLocationApi; /// /// 区划 /// /// public record District { /// /// 行政区划唯一标识(adcode) /// /// [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; /// /// 简称,如“内蒙古” /// /// [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; /// /// 行政区划级别 /// /// [JsonPropertyName("level")] public int? Level { get; set; } /// /// 全称,如“内蒙古自治区” /// /// [JsonPropertyName("fullname")] public string FullName { get; set; } = string.Empty; /// /// 行政区划拼音,每一下标为一个字的全拼,如:[“nei”,“meng”,“gu”] /// /// [JsonPropertyName("pinyin")] public string[]? PinYin { get; set; } /// /// 经纬度 /// /// [JsonPropertyName("location")] public Location Location { get; set; } = new(); /// /// 当前区划的下级区划信息,结构与当前区划一致,如果没有下级区划则不返回此字段 /// /// [JsonPropertyName("districts")] public District[]? Districts { get; set; } } /// /// 经纬度 /// /// public record Location { /// /// 纬度 /// /// [JsonPropertyName("lat")] public decimal Latitude { get; set; } /// /// 经度 /// /// [JsonPropertyName("lng")] public decimal Longitude { get; set; } }