using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.MES.Base.Application.Services
{
    public class WorkPlanDto
    {
        /// <summary>
        /// 计划名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 成品Id
        /// </summary>
        public string FinalId { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public string Quantity { get; set; }
        /// 开始时间
        /// </summary>
        public DateTime ExpectedStartTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime ExpectedEndTime { get; set; }
    }
    /// <summary>
    /// 增加
    /// </summary>
    public class WorkPlanAddInput : WorkPlanDto
    {

    }
    /// <summary>
    /// 更新
    /// </summary>
    public class WorkPlanUpdateInput : WorkPlanDto
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string Id { get; set; }
    }
    /// <summary>
    /// 删除
    /// </summary>
    public class WorkPlanDelInput
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string Id { get; set; }
    }
    /// <summary>
    /// 分页
    /// </summary>
    public class WorkPlanQueryPageInput : RequestPage
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 成品Id
        /// </summary>

        public string FinalId { get; set; }
    }
    /// <summary>
    /// 输出
    /// </summary>
    public class WorkPlanOutput : WorkPlanDto
    {
        /// <summary>
        /// 主键
        /// </summary>
        /// <example></example>
        public string Id { get; set; }
        /// <summary>
        /// 成品名称
        /// </summary>
        public string FinalName { get; set; }
        /// <summary>
        /// 时间段
        /// </summary>
        public string[] DateRange { get {
                List<string> list = new(){ExpectedStartTime.ToString("yyyy-MM-dd"), ExpectedEndTime.ToString("yyyy-MM-dd") };
                return list.ToArray(); 
            } } 
    }
}
