using MadRunFabric.Common;
using MadRunFabric.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace DistributionApi.Model.Dto
{
    public class Distri_Workorder_PlanDto
    {
        /// <summary>
        /// 自增id
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 渠道来源 1表示PC 2表示安卓 3表示IOS 4表示微信
        /// </summary>
        public int channel { get; set; } = 1;
        /// <summary>
        /// 配送计划状态：0开始，1中止(结束)
        /// </summary>
        public int planstate { get; set; } = 0;
        /// <summary>
        /// 项目名称id
        /// </summary>
        public string projectid { get; set; }
        public string projectname { get; set; }

        /// <summary>
        /// 计划ID - 循环频率 -----------------------------hangfire
        /// </summary>
        public string hangfireid { get; set; }
        /// <summary>
        /// 执行频率
        /// </summary>
        public int plantime { get; set; }
        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime startdate { get; set; }
        /// <summary>
        /// 结束日期
        /// </summary>
        public DateTime enddate { get; set; }

        /// <summary>
        /// 计划名称 --------------------------------------------------
        /// </summary>
        public string planname { get; set; } = "";
        /// <summary>
        /// 计划内容
        /// </summary>
        public string plancontent { get; set; }
        ///// <summary>
        ///// 计划参与人
        ///// </summary>
        //public List<string> joinuserlist { get; set; } //======================不用，用的是排班
        ///// <summary>
        ///// 抢单人/计划任务参与人 电话 -------------------------------------------
        ///// </summary>
        //public List<string> joinusertel { get; set; }

        /// <summary>
        /// 配送物品 ------------------------------------------- 物品种类、物品数量（非必填）、收货地址（非必填）
        /// </summary>
        public List<DistributionGoodsList> goodslist { get; set; }

        /////// <summary>
        /////// 收件（地址，科室，联系） ------------------------------------------- 把收/发地址信息保存起来，保证地址的独立性
        /////// </summary>
        ////public List<DistributionDddressModel> receiverlist { get; set; }
        /// <summary>
        /// 发货（地址，科室，联系）
        /// </summary>
        public List<DistributionDddressModel> deliverylist { get; set; }

        /// <summary>
        /// 发货人
        /// </summary>
        public string deliveryname { get; set; } = "";
        /// <summary>
        /// 发货电话
        /// </summary>
        public string deliverytel { get; set; } = "";

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? statetime { get; set; }
        /// <summary>
        /// 处理人 -------------------------------------------------
        /// </summary>
        public string dealby { get; set; }
        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime dealtime { get; set; }

        ///// <summary>
        ///// 排序 --------------------------------------------------
        ///// </summary>
        public int sortnum { get; set; } = 0;
        /// <summary>
        /// 添加人工号
        /// </summary>
        public string createtby { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime createtime { get; set; } = DateTime.Now;
        ///// <summary>
        ///// 是否删除(0正常 1删除)
        ///// </summary>
        //public int isdelete { get; set; } = 0;
        ///// <summary>
        ///// 删除人
        ///// </summary>
        //public string deleteby { get; set; }
        ///// <summary>
        ///// 删除时间
        ///// </summary>
        //public DateTime deletetime { get; set; }

        #region 定时计划 循环频率
        /// <summary>
        /// 定时任务周期：1年，2月，3周，4日，5时，6分 
        /// 超时任务周期：5时，6分
        /// </summary>
        public int plancycle { get; set; } = 0;

        /// <summary>
        /// 执行间隔
        /// </summary>
        public int planinterval { get; set; } = 0;
        /// <summary>
        /// 执行频率
        /// </summary>
        public int plantimes { get; set; } = 0;

        /// <summary>
        /// 自定义时间段
        /// </summary>
        public List<ExtensionTimeModel> extensiontime { get; set; } = null;
        #endregion
    }
}
