using Hotline.Share.Dtos.Order;
using Hotline.Share.Enums.Push;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.Push.FWMessage
{
    public record MessageDataDto
    {
        /// <summary>
        /// ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 消息推送业务
        /// </summary>
        public EPushBusiness PushBusiness { get; set; }
        public string PushBusinessText => PushBusiness.GetDescription();

        /// <summary>
        /// 接收姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 接收手机号码
        /// </summary>
        public string TelNumber { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTime? SendTime { get; set; }

        /// <summary>
        /// 发送人
        /// </summary>
        public string? SendUser { get; set; }

        /// <summary>
        /// 发送部门
        /// </summary>
        public string? SendOrganize { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 关联工单编号
        /// </summary>
        public string? OrderNo { get; set; }

        /// <summary>
        /// 关联工单ID
        /// </summary>
        public string? OrderId { get; set; }



        /// <summary>
        /// 推送状态
        /// </summary>
        public EPushStatus Status { get; set; }
        public string StatusText => Status.GetDescription();

        /// <summary>
        /// 发送失败原因
        /// </summary>
        public string Reason { get; set; }

        /// <summary>
        /// 发送短信使用的数量
        /// </summary>
        public int? MsgCount { get; set; }

        /// <summary>
        /// 短信发送状态
        /// </summary>
        public ESendState SendState { get; set; }
        public string SendStateText => SendState.GetDescription();

        /// <summary>
        /// 从发次数
        /// </summary>
        public int ResendCount { get; set; }

        /// <summary>
        /// 短信回复是否回复
        /// </summary>   
        public bool IsSmsReply { get; set; }

        /// <summary>
        /// 短信回复内容
        /// </summary>   
        public string? SmsReplyContent { get; set; }

        /// <summary>
        /// 短信回复时间
        /// </summary>
        public DateTime? SmsReplyTime { get; set; }
    }
}
