using DataSharing.SendTask;
using SqlSugar;
using System.ComponentModel;

namespace DataSharing.Province.SendTask.SubmitCaseInfo
{
    /// <summary>
    /// 服务工单受理推送任务数据
    /// </summary>
    [Description("服务工单受理推送任务数据")]
    [SugarIndex("index_dssendtasksubmitcaseinfo_expiredtime", nameof(ExpiredTime), OrderByType.Desc)]
    [SugarIndex("index_dssendtasksubmitcaseinfo_casesource", nameof(CaseSource), OrderByType.Desc)]
    [SugarIndex("index_dssendtasksubmitcaseinfo_orderid", nameof(OrderId), OrderByType.Desc)]
    [SugarIndex("index_dssendtasksubmitcaseinfo_provinceno", nameof(ProvinceNo), OrderByType.Desc)]
    [SugarIndex("index_dssendtasksubmitcaseinfo_firsttime", nameof(FirstTime), OrderByType.Desc)]
    [SugarIndex("index_dssendtasksubmitcaseinfo_lasttime", nameof(LastTime), OrderByType.Desc)]
    [SugarIndex("index_dssendtasksubmitcaseinfo_generationtime", nameof(GenerationTime), OrderByType.Desc)]
    public class DsSendTaskSubmitCaseInfo : BaseSendTask
    {
        /// <summary>
        /// 组装参数
        /// </summary>
        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true, ColumnDescription = "组装参数")]
        public Share.Dtos.Province.HuiJu.SubmitCaseInfo RequestData { get; set; }

        /// <summary>
        /// 待推送数据
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(Id))]
        public DsWaitSendTaskSubmitCaseInfo WaitSendTaskSubmitCaseInfo { get; set; }

        /// <summary>
        /// 期满时间
        /// </summary>
        [SugarColumn(ColumnDescription = "期满时间")]
        public DateTime? ExpiredTime { get; set; }

        /// <summary>
        /// 诉求渠道
        /// </summary>
        [SugarColumn(ColumnDescription = "诉求渠道")]
        public string? CaseSource { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        [SugarColumn(ColumnDescription = "工单编号")]
        public string? OrderId { get; set; }
    }
}
