using System.ComponentModel.DataAnnotations;

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

/// <summary>
/// 工作任务设备分配修改输入
/// </summary>
public class WorkOrderEquipmentUpdateInput
{
    /// <summary>
    /// 任务ID
    /// </summary>
    [Required(ErrorMessage = "任务ID不能为空")]
    public long WorkOrderId { get; set; }

    /// <summary>
    /// 任务设备ID（可为空，表示取消分配）
    /// </summary>
    public long? AssignedEquipmentId { get; set; }

    /// <summary>
    /// 任务设备名称
    /// </summary>
    [MaxLength(200, ErrorMessage = "设备名称长度不能超过200个字符")]
    public string AssignedEquipmentName { get; set; }

    /// <summary>
    /// 是否强制更新（忽略冲突警告）
    /// </summary>
    public bool ForceUpdate { get; set; } = false;

    /// <summary>
    /// 修改原因
    /// </summary>
    [MaxLength(500, ErrorMessage = "修改原因长度不能超过500个字符")]
    public string UpdateReason { get; set; } = "";
}