namespace Hotline.Share.Dtos.ProvinceStatistics
{
    public class OrderWarningDto
    {
        /// <summary>
        /// 预警规则
        /// </summary>
        public string WarnRulename { get; set; }

        /// <summary>
        /// 规则明细
        /// </summary>
        public string WarnDescribe { get; set; }

        /// <summary>
        /// 预警应处理时间
        /// </summary>
        public DateTime? WarnTimebf { get; set; }

        /// <summary>
        /// 预警等级
        /// </summary>
        public string WarnDegree { get; set; }
        public string WarnDegreeNameText => WarnDegreeName();

        /// <summary>
        /// 预警类型
        /// </summary>
        public string WarnType { get; set; }
        public string WarnTypeNameText => WarnTypeName();

        /// <summary>
        /// 预警时间
        /// </summary>
        public DateTime? WarnDate { get; set; }

        public string WarnTypeName()
        {
            return WarnType switch
            {
                "sign" => "签收",
                "finish" => "办结",
                _ => "签收",
            };
        }

        public string WarnDegreeName()
        {
            return WarnDegree switch
            {
                "1" => "提示",
                "2" => "警告",
                "3" => "严重",
                _ => "提示",
            };
        }
    }
}
