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 ShiftUnavailabilityAddInput
{
    /// <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>
    [Required(ErrorMessage = "原因类型不能为空")]
    public UnavailabilityReasonType ReasonType { get; set; }

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

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

    /// <summary>
    /// 生效开始时间（可选）
    /// </summary>
    public TimeSpan? EffectiveStartTime { get; set; }

    /// <summary>
    /// 生效结束时间（可选）
    /// </summary>
    public TimeSpan? EffectiveEndTime { get; set; }
}