using System;
using System.ComponentModel.DataAnnotations;
using NPP.SmartSchedue.Api.Contracts.Core.Enums;

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

/// <summary>
/// 单元格切换输入模型
/// 用于网格视图中的单元格快速切换操作
/// </summary>
public class CellToggleInput
{
    /// <summary>
    /// 员工ID
    /// </summary>
    [Required(ErrorMessage = "员工ID不能为空")]
    public long PersonnelId { get; set; }

    /// <summary>
    /// 日期
    /// </summary>
    [Required(ErrorMessage = "日期不能为空")]
    public DateTime Date { get; set; }

    /// <summary>
    /// 班次ID
    /// </summary>
    [Required(ErrorMessage = "班次ID不能为空")]
    public long ShiftId { get; set; }
}

/// <summary>
/// 单元格设置输入模型
/// 用于网格视图中的单元格精确设置操作
/// </summary>
public class CellSetInput
{
    /// <summary>
    /// 员工ID
    /// </summary>
    [Required(ErrorMessage = "员工ID不能为空")]
    public long PersonnelId { get; set; }

    /// <summary>
    /// 日期
    /// </summary>
    [Required(ErrorMessage = "日期不能为空")]
    public DateTime Date { get; set; }

    /// <summary>
    /// 班次ID
    /// </summary>
    [Required(ErrorMessage = "班次ID不能为空")]
    public long ShiftId { get; set; }

    /// <summary>
    /// 不可用原因类型（null表示清除标记）
    /// </summary>
    public UnavailabilityReasonType? ReasonType { get; set; }

    /// <summary>
    /// 备注说明
    /// </summary>
    [StringLength(200, ErrorMessage = "备注长度不能超过200字符")]
    public string Remark { get; set; }

    /// <summary>
    /// 优先级权重
    /// </summary>
    [Range(1, 100, ErrorMessage = "优先级权重必须在1-100之间")]
    public int Priority { get; set; } = 1;
}