using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.WorkEngineering.WebApi.Controllers;

namespace WCS.WorkEngineering.WebApi.Models.WCS.Response
{
    /// <summary>
    ///  有关设备运行信息的dto
    /// </summary>
    public class RunInfoViewMode
    {
        public string Code { get; set; }

        /// <summary>
        ///  出库任务
        /// </summary>
        public int OutDepot { get; set; }

        /// <summary>
        ///  入库任务
        /// </summary>
        public int EnterDepot { get; set; }

        /// <summary>
        ///  移库任务
        /// </summary>
        public int MoveDepot { get; set; }

        /// <summary>
        ///  空闲
        /// </summary>
        public double Free { get; set; }

        /// <summary>
        ///  手动
        /// </summary>
        public double Manual { get; set; }

        /// <summary>
        ///  自动
        /// </summary>
        public double Automatic { get; set; }

        /// <summary>
        ///  报警
        /// </summary>
        public double Alarm { get; set; }

        /// <summary>
        ///  运行
        /// </summary>
        public double Working { get; set; }

        /// <summary>
        ///  总时间
        /// </summary>
        public double TotalTime { get; set; }

        /// <summary>
        ///  设备执行分析
        /// </summary>
        public List<DevActionViewMode> DevAction { get; set; }

        /// <summary>
        ///  任务执行工位使用数量
        /// </summary>
        public List<StationCount> StationCount { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        ///  结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
    }

    /// <summary>
    ///  设备动作分析
    /// </summary>
    public class DevActionViewMode
    {
        /// <summary>
        ///  动作次数
        /// </summary>
        public double ActionAmount { get; set; }

        /// <summary>
        ///  动作平均耗时
        /// </summary>
        public double ActionTime { get; set; }

        /// <summary>
        ///  动作类型
        /// </summary>
        public string Type { get; set; }
    }

    /// <summary>
    ///  任务执行工位数量
    /// </summary>
    public class StationCount
    {
        /// <summary>
        ///  执行数量
        /// </summary>
        public double StationNum { get; set; }

        /// <summary>
        ///  工位数
        /// </summary>
        public double StationIndex { get; set; }

        /// <summary>
        ///  任务类型
        /// </summary>
        public string Type { get; set; }
    }

    /// <summary>
    ///  设备动作类型
    /// </summary>
    public enum DevActionType
    {
        /// <summary>
        ///  入库
        /// </summary>
        [Description("入库")]
        In = 0,

        /// <summary>
        ///  出库
        /// </summary>
        [Description("出库")]
        Out = 1,

        /// <summary>
        ///  移库
        /// </summary>
        [Description("移库")]
        Move = 2,
    }
}
