using MadRunFabric.Common;
using MadRunFabric.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DistributionApi.Models.Input
{
    public class DistriWorkOrderPlanInput
    {
        /// <summary>
        /// 自增id
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 渠道来源 1表示PC 2表示安卓 3表示IOS 4表示微信
        /// </summary>
        public int channel { get; set; } = 1;
        /// <summary>
        /// 项目名称id
        /// </summary>
        public string projectid { get; set; }
        /// <summary>
        /// 计划ID - 循环频率
        /// </summary>
        public string hangfireid { 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>
        /// 计划状态：0开始，1结束
        /// </summary>
        public int planstate { get; set; } = 0;
        /// <summary>
        /// 计划参与人
        /// </summary>
        public List<string> joinuserlist { 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 int sortnum { get; set; } = 0;

        #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
    }
}
