namespace Hotline.Share.Dtos;

public class Position
{
    /// <summary>
    /// 经度
    /// </summary>
    public double? Longitude { get; set; }

    /// <summary>
    /// 维度
    /// </summary>
    public double? Latitude { get; set; }

    /// <summary>
    /// 行政区划编码;
    /// Area对象的Id;
    /// </summary>
    public string? AreaCode { get; set; }

    /// <summary>
    /// 省
    /// </summary>
    public string? Province { get; set; }

    /// <summary>
    /// 市
    /// </summary>
    public string? City { get; set; }

    /// <summary>
    /// 区/县
    /// </summary>
    public string? County { get; set; }

    /// <summary>
    /// 乡镇(4级行政区划)
    /// </summary>
    public string? Town { get; set; }

    /// <summary>
    /// 详细街道
    /// </summary>
    public string? Street { get; set; }

    /// <summary>
    /// 行政区划地址
    /// </summary>
    public string? Address { get; set; }

    /// <summary>
    /// 完整地址
    /// </summary>
    public string? FullAddress { get; set; }

    public void InitAddress()
    {
        Address = $"{Province}{City}{County}{Town}";
        FullAddress = $"{Address}{Street}";
    }
}