using Hotline.Share.Enums.Ai;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

namespace Hotline.Ai.Visit
{
    [Description("智能回访")]
    public class AiOrderVisit : CreationEntity
    {
        public string Name { get; set; }

        public DateTime BeginTime { get; set; }

        public DateTime EndTime { get; set; }

        public EAiOrderVisitTaskState TaskState { get; set; }
        /// <summary>
        /// 批次上报结果ID
        /// </summary>
        public string? BatchUid { get; set; }


        /// <summary>
        /// 节日禁呼 0：否 1：是
        /// </summary>
        public int FestivalBan { get; set; }

        /// <summary>
        /// 外呼规则类型 1：自定义 2：：使用现有规则
        /// </summary>
        public int RuleType { get; set; }

        /// <summary>
        /// 现有外呼规则ID
        /// </summary>
        public string? RuleUid { get; set; }

        /// <summary>
        /// 子表
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(AiOrderVisitDetail.AiOrderVisitId))]
        public List<AiOrderVisitDetail> AiOrderVisitDetails { get; set; }

        /// <summary>
        /// 应回访数量
        /// </summary>
        public int HasVisitCount { get; set; }

        /// <summary>
        /// 已回访成功数量
        /// </summary>
        public int VisitedCount { get; set; }

        /// <summary>
        /// 已回访失败数量
        /// </summary>
        public int VisitedFailCount { get; set; }
    }
}
