using Hotline.CallCenter.Ivrs;
using Hotline.CallCenter.Tels;
using Hotline.Share.Dtos.Trunk;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

namespace Hotline.Settings
{
    [Description("线路IVR配置")]
    public class TrunkIvrManager: CreationEntity
    {
        /// <summary>
        /// 线路ID
        /// </summary>
        public string TrunkId { get; set; }

        /// <summary>
        /// 早上开始时间
        /// </summary>
        public string MorningBegin { get; set; }

        /// <summary>
        /// 早上结束时间
        /// </summary>
        public string MorningEnd { get; set; }

        /// <summary>
        /// 下午开始时间
        /// </summary>
        public string AfterBegin { get; set; }    

        /// <summary>
        /// 下午结束时间
        /// </summary>
        public string AfterEnd { get; set; }

        /// <summary>
        /// 工作日
        /// </summary>
        [SugarColumn(ColumnDataType = "json", IsJson = true)]
        public List<WorkDayModel> WorkDay { get; set; }

        /// <summary>
        /// 工作时间IVR
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string WorkCategory { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(WorkCategory))]
        public IvrCategory? WorkCategoryModel { get; set; }

        /// <summary>
        /// 休息时间IVR
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string RestCategory { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(RestCategory))]
        public IvrCategory? RestCategoryModel { get; set; }

        /// <summary>
        /// 工作时间直接转分机组
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string WorkToGroup { get; set; }

        [Navigate(NavigateType.Dynamic, null)]
        public TelGroup? WorkToGroupModel { get; set; }

        /// <summary>
        /// 休息时间直接转分机组
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? RestToGroup { get; set; }

        [Navigate(NavigateType.Dynamic, null)]
        public TelGroup? RestToGroupModel { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 评价语音
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string EvaluateCategory { get; set; }
    }

}
