using System.Collections.Generic;

namespace NPP.SmartSchedue.Api.Contracts.Services.Work.Output;

/// <summary>
/// 可用人员输出
/// </summary>
public class AvailablePersonnelOutput
{
    /// <summary>
    /// 任务ID
    /// </summary>
    public long WorkOrderId { get; set; }

    /// <summary>
    /// 任务代码
    /// </summary>
    public string WorkOrderCode { get; set; } = "";

    /// <summary>
    /// 可用的实施人员列表
    /// </summary>
    public List<AvailablePersonnelInfo> AvailablePersonnel { get; set; } = new List<AvailablePersonnelInfo>();

    /// <summary>
    /// 可用的FL人员列表
    /// </summary>
    public List<AvailablePersonnelInfo> AvailableFLPersonnel { get; set; } = new List<AvailablePersonnelInfo>();

    /// <summary>
    /// 总可用人员数量
    /// </summary>
    public int TotalAvailableCount { get; set; }

    /// <summary>
    /// 查询结果摘要
    /// </summary>
    public string Summary { get; set; } = "";
}

/// <summary>
/// 可用人员信息
/// </summary>
public class AvailablePersonnelInfo
{
    /// <summary>
    /// 人员ID
    /// </summary>
    public long PersonnelId { get; set; }

    /// <summary>
    /// 人员姓名
    /// </summary>
    public string PersonnelName { get; set; } = "";

    /// <summary>
    /// 部门名称
    /// </summary>
    public string DepartmentName { get; set; } = "";

    /// <summary>
    /// 岗位名称
    /// </summary>
    public string PositionName { get; set; } = "";

    /// <summary>
    /// 具备的资质列表
    /// </summary>
    public List<PersonnelQualificationInfo> Qualifications { get; set; } = new List<PersonnelQualificationInfo>();

    /// <summary>
    /// 当前工作负荷（百分比）
    /// </summary>
    public double WorkloadPercentage { get; set; }

    /// <summary>
    /// 可用度评分（1-10，10分最优）
    /// </summary>
    public int AvailabilityScore { get; set; }

    /// <summary>
    /// 备注信息
    /// </summary>
    public string Remarks { get; set; } = "";
}

/// <summary>
/// 人员资质信息
/// </summary>
public class PersonnelQualificationInfo
{
    /// <summary>
    /// 资质ID
    /// </summary>
    public long QualificationId { get; set; }

    /// <summary>
    /// 资质名称
    /// </summary>
    public string QualificationName { get; set; } = "";

    /// <summary>
    /// 资质等级
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 有效期至
    /// </summary>
    public DateTime? ValidUntil { get; set; }

    /// <summary>
    /// 是否满足任务要求
    /// </summary>
    public bool MeetsRequirement { get; set; }
}