using Siger.Middlelayer.Repository.Entities;
using System;
using System.Collections.Generic;

namespace Siger.Middlelayer.TpmRepository.Response
{
    public class ResponseAndonOee
    {
        public int id { get; set; }
        /// <summary>
        /// 通道id
        /// </summary>
        public int sectionID { get; set; }
        /// <summary>
        /// 通道
        /// </summary>
        public string sectionName { get; set; }

        /// <summary>
        /// 设备id
        /// </summary>
        public int machineID { get; set; }

        /// <summary>
        /// 产量
        /// </summary>
        public int yield { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string productName { get; set; }

        /// <summary>
        /// 数据时间
        /// </summary>
        public DateTime dataTime { get; set; }
        /// <summary>
        /// 数据时间 （小时）
        /// </summary>
        public int hour { get; set; }
        /// <summary>
        /// 是否换型
        /// </summary>
        public int status { get; set; }
        public double cycletime { get; set; }
        /// <summary>
        /// 损失时长
        /// </summary>
        public double subtraction { get; set; }
        public DateTime startTime { get; set; }
        public DateTime endTime { get; set; }
        public string str_startTime { get; set; }
        public string str_endTime { get; set; }
        /// <summary>
        /// 损失类型id
        /// </summary>
        public int type { get; set; }
        /// <summary>
        /// 异常类型id
        /// </summary>
        public int expectionid { get; set; }
        /// <summary>
        /// 损失类型
        /// </summary>
        public string type_name { get; set; }
        /// <summary>
        /// 二级类型
        /// </summary>
        public string expection2 { get; set; } = "";
        /// <summary>
        /// 三级类型
        /// </summary>
        public string expection3 { get; set; } = "";
        /// <summary>
        /// 责任岗位
        /// </summary>
        public string usergroup_name { get; set; } = "";
        public string workOrderId { get; set; }
        /// <summary>
        /// 修改人id
        /// </summary>
        public int editor { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string editor_name { get; set; } = "";
        /// <summary>
        /// 修改时间
        /// </summary>
        public int edit_time { get; set; }
        public string rel_edit_time { get; set; }
    }

    public class ResponseOeeStatistical
    {
        public List<double> y { get; set; }
        public List<string> x { get; set; }
        public List<ResponseOeeStatisticalTable> data { get; set; } = new List<ResponseOeeStatisticalTable>();
    }
    public class ResponseOeeStatisticalTable
    {
        public string name { get; set; }
        public double rate { get; set; }
    }

    public class ResponseOeeLoss
    {
        public List<double> y1 { get; set; } = new List<double>();
        public List<double> y2 { get; set; } = new List<double>();
        public List<string> x { get; set; }
        public List<ResponseOeeLossTable> data { get; set; } = new List<ResponseOeeLossTable>();
    }
    public class ResponseOeeLossTable
    {
        public string name { get; set; }
        public DateTime start { get; set; }
        public DateTime end { get; set; }
        public double loss { get; set; }
    }
}
