Files
2026-03-25 14:55:34 +08:00

74 lines
1.9 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Text.Json.Serialization;
namespace StopShopping.OpenPlatform.TencentLocationApi;
/// <summary>
/// 区划
/// </summary>
/// <value></value>
public record District
{
/// <summary>
/// 行政区划唯一标识adcode
/// </summary>
/// <value></value>
[JsonPropertyName("id")]
public string Id { get; set; } = string.Empty;
/// <summary>
/// 简称,如“内蒙古”
/// </summary>
/// <value></value>
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 行政区划级别
/// </summary>
/// <value></value>
[JsonPropertyName("level")]
public int? Level { get; set; }
/// <summary>
/// 全称,如“内蒙古自治区”
/// </summary>
/// <value></value>
[JsonPropertyName("fullname")]
public string FullName { get; set; } = string.Empty;
/// <summary>
/// 行政区划拼音,每一下标为一个字的全拼,如:[“nei”,“meng”,“gu”]
/// </summary>
/// <value></value>
[JsonPropertyName("pinyin")]
public string[]? PinYin { get; set; }
/// <summary>
/// 经纬度
/// </summary>
/// <returns></returns>
[JsonPropertyName("location")]
public Location Location { get; set; } = new();
/// <summary>
/// 当前区划的下级区划信息,结构与当前区划一致,如果没有下级区划则不返回此字段
/// </summary>
/// <value></value>
[JsonPropertyName("districts")]
public District[]? Districts { get; set; }
}
/// <summary>
/// 经纬度
/// </summary>
/// <value></value>
public record Location
{
/// <summary>
/// 纬度
/// </summary>
/// <value></value>
[JsonPropertyName("lat")]
public decimal Latitude { get; set; }
/// <summary>
/// 经度
/// </summary>
/// <value></value>
[JsonPropertyName("lng")]
public decimal Longitude { get; set; }
}