using System;
using System.Collections.Generic;
using NPP.SmartSchedue.Api.Contracts.Core.Enums;
using NPP.SmartSchedue.Api.Contracts.Services.Work.Input;

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

/// <summary>
/// 工作任务详情输出
/// </summary>
public class WorkOrderGetOutput
{
    /// <summary>
    /// 任务ID
    /// </summary>
    public long Id { get; set; }

    #region 基础信息
    
    /// <summary>
    /// 项目号
    /// </summary>
    public string ProjectNumber { get; set; }

    /// <summary>
    /// 项目类别
    /// </summary>
    public string ProjectCategory { get; set; }

    /// <summary>
    /// 班次ID
    /// </summary>
    public long ShiftId { get; set; }

    /// <summary>
    /// 班次代码
    /// </summary>
    public string ShiftCode { get; set; }

    /// <summary>
    /// 班次名称
    /// </summary>
    public string ShiftName { get; set; }

    /// <summary>
    /// 工序ID
    /// </summary>
    public long ProcessId { get; set; }

    /// <summary>
    /// 工序代码
    /// </summary>
    public string ProcessCode { get; set; }

    /// <summary>
    /// 工序名称
    /// </summary>
    public string ProcessName { get; set; }

    /// <summary>
    /// 工序分类
    /// </summary>
    public ProcessCategoryEnum ProcessCategory { get; set; }

    /// <summary>
    /// 工序分类名称
    /// </summary>
    public string ProcessCategoryName { get; set; }

    #endregion
    
    #region 任务信息

    /// <summary>
    /// 任务名称
    /// </summary>
    public string WorkOrderName { get; set; }

    /// <summary>
    /// 任务代码（项目号_班次code_工序code）
    /// </summary>
    public string WorkOrderCode { get; set; }

    /// <summary>
    /// 批号
    /// </summary>
    public string BatchNumber { get; set; }

    /// <summary>
    /// 任务日期
    /// </summary>
    public DateTime WorkOrderDate { get; set; }

    /// <summary>
    /// 任务状态
    /// </summary>
    public WorkOrderStatusEnum Status { get; set; }

    /// <summary>
    /// 任务状态名称
    /// </summary>
    public string StatusName { get; set; }

    #endregion
    
    #region 人员和设备

    /// <summary>
    /// FL人员列表
    /// </summary>
    public List<FLPersonnelInfo> FLPersonnels { get; set; } = new List<FLPersonnelInfo>();

    /// <summary>
    /// 任务实施人员ID
    /// </summary>
    public long? AssignedPersonnelId { get; set; }

    /// <summary>
    /// 任务实施人员姓名
    /// </summary>
    public string AssignedPersonnelName { get; set; }

    /// <summary>
    /// 任务设备ID
    /// </summary>
    public long? AssignedEquipmentId { get; set; }

    /// <summary>
    /// 任务设备名称
    /// </summary>
    public string AssignedEquipmentName { get; set; }

    #endregion
    
    #region 时间信息

    /// <summary>
    /// 任务实际开始时间
    /// </summary>
    public DateTime? ActualStartTime { get; set; }

    /// <summary>
    /// 任务实际结束时间
    /// </summary>
    public DateTime? ActualEndTime { get; set; }

    /// <summary>
    /// 实际完成工时（小时）
    /// </summary>
    public decimal? ActualWorkHours { get; set; }

    #endregion

    #region 系统字段

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedTime { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? ModifiedTime { get; set; }

    /// <summary>
    /// 创建者
    /// </summary>
    public string CreatedBy { get; set; }

    /// <summary>
    /// 修改者
    /// </summary>
    public string ModifiedBy { get; set; }

    #endregion
}