using Hotline.Share.Requests;

namespace Hotline.Share.Dtos.Settings
{
    public class SystemMobilAreaDto
    {
        /// <summary>
        /// 归属地
        /// </summary>
        public string? MobileAreaName { get; set; }

        /// <summary>
        /// 运营商
        /// </summary>
        public string? OFlag { get; set; }

        /// <summary>
        /// 卡类型
        /// </summary>
        public string? OperatorName { get; set; }
    }

    public class AddSystemMobilAreaDto
    {
        /// <summary>
        /// 座机编号
        /// </summary>
        public string TelCode { get; set; }

        /// <summary>
        /// 手机编号
        /// </summary>
        public string MobileCode { get; set; }

        /// <summary>
        /// 归属地
        /// </summary>
        public string MobileAreaName { get; set; }

        /// <summary>
        /// 运营商
        /// </summary>
        public string OFlag { get; set; }

        /// <summary>
        /// 卡类型
        /// </summary>
        public string OperatorName { get; set; }
    }

    public class UpdateSystemMobilAreaDto : AddSystemMobilAreaDto
    {
        public string Id { get; set; }
    }

    public record SystemMobilAreaRequestDto : PagedKeywordRequest
    {
        /// <summary>
        /// 座机编号
        /// </summary>
        public string TelCode { get; set; }

        /// <summary>
        /// 手机编号
        /// </summary>
        public string MobileCode { get; set; }

        /// <summary>
        /// 归属地
        /// </summary>
        public string MobileAreaName { get; set; }

        /// <summary>
        /// 运营商
        /// </summary>
        public string OFlag { get; set; }

        /// <summary>
        /// 卡类型
        /// </summary>
        public string OperatorName { get; set; }
    }

    public class SystemMobilAreaListDto
    {
        public string? Id { get; set; }

        /// <summary>
        /// 座机编号
        /// </summary>
        public string TelCode { get; set; }

        /// <summary>
        /// 手机编号
        /// </summary>
        public string MobileCode { get; set; }

        /// <summary>
        /// 归属地
        /// </summary>
        public string MobileAreaName { get; set; }

        /// <summary>
        /// 运营商
        /// </summary>
        public string OFlag { get; set; }
        public string OFlagText => OFlag == "1" ? "中国电信" : OFlag == "2" ? "中国移动" : OFlag == "3" ? "中国联通" : "其他";

        /// <summary>
        /// 卡类型
        /// </summary>
        public string OperatorName { get; set; }

        public DateTime? CreationTime { get; set; }

        public string? CreatorName { get; set; }
    }
}
