using System.Collections.Generic;

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

/// <summary>
/// 工作任务分配更新结果输出
/// </summary>
public class WorkOrderAssignmentUpdateOutput
{
    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 消息
    /// </summary>
    public string Message { get; set; } = "";

    /// <summary>
    /// 验证警告列表
    /// </summary>
    public List<ValidationWarning> Warnings { get; set; } = new List<ValidationWarning>();

    /// <summary>
    /// 验证错误列表
    /// </summary>
    public List<ValidationError> Errors { get; set; } = new List<ValidationError>();

    /// <summary>
    /// 更新后的任务信息
    /// </summary>
    public WorkOrderGetOutput UpdatedWorkOrder { get; set; }
}

/// <summary>
/// 验证警告
/// </summary>
public class ValidationWarning
{
    /// <summary>
    /// 警告类型
    /// </summary>
    public string Type { get; set; }

    /// <summary>
    /// 警告消息
    /// </summary>
    public string Message { get; set; }

    /// <summary>
    /// 相关资源信息
    /// </summary>
    public object RelatedInfo { get; set; }
}

/// <summary>
/// 验证错误
/// </summary>
public class ValidationError
{
    /// <summary>
    /// 错误类型
    /// </summary>
    public string Type { get; set; }

    /// <summary>
    /// 错误消息
    /// </summary>
    public string Message { get; set; }

    /// <summary>
    /// 相关资源信息
    /// </summary>
    public object RelatedInfo { get; set; }
}