Asoka.Wang 0a2e2d9b18 123
2025-09-02 18:52:35 +08:00

72 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}