using System;
using System.Collections.Generic;

namespace NPP.SmartSchedue.Api.Contracts.Services.Integration.Output
{
    /// <summary>
    /// 设备使用统计信息
    /// 用于分析设备资源的利用率和可用容量
    /// </summary>
    public class EquipmentUsageStatistics
    {
        /// <summary>
        /// 统计开始日期
        /// </summary>
        public DateTime StartDate { get; set; }

        /// <summary>
        /// 统计结束日期
        /// </summary>
        public DateTime EndDate { get; set; }

        /// <summary>
        /// 总设备数量
        /// </summary>
        public int TotalEquipmentCount { get; set; }

        /// <summary>
        /// 可用设备数量
        /// </summary>
        public int AvailableEquipmentCount { get; set; }

        /// <summary>
        /// 维护中设备数量
        /// </summary>
        public int MaintenanceEquipmentCount { get; set; }

        /// <summary>
        /// 校验中设备数量
        /// </summary>
        public int CalibrationEquipmentCount { get; set; }

        /// <summary>
        /// 故障设备数量
        /// </summary>
        public int FaultEquipmentCount { get; set; }

        /// <summary>
        /// 平均利用率（百分比）
        /// </summary>
        public decimal AverageUtilizationRate { get; set; }

        /// <summary>
        /// 总可用容量（设备小时）
        /// </summary>
        public decimal TotalAvailableCapacity { get; set; }

        /// <summary>
        /// 已使用容量（设备小时）
        /// </summary>
        public decimal UsedCapacity { get; set; }

        /// <summary>
        /// 按日期统计的详细信息
        /// </summary>
        public List<DailyEquipmentUsage> DailyUsageDetails { get; set; } = new List<DailyEquipmentUsage>();
    }

    /// <summary>
    /// 每日设备使用详情
    /// </summary>
    public class DailyEquipmentUsage
    {
        /// <summary>
        /// 日期
        /// </summary>
        public DateTime Date { get; set; }

        /// <summary>
        /// 当日可用设备数量
        /// </summary>
        public int AvailableCount { get; set; }

        /// <summary>
        /// 当日维护设备数量
        /// </summary>
        public int MaintenanceCount { get; set; }

        /// <summary>
        /// 当日校验设备数量
        /// </summary>
        public int CalibrationCount { get; set; }

        /// <summary>
        /// 当日故障设备数量
        /// </summary>
        public int FaultCount { get; set; }

        /// <summary>
        /// 当日利用率（百分比）
        /// </summary>
        public decimal UtilizationRate { get; set; }
    }
}