using System.ComponentModel.DataAnnotations;

namespace MilitaryTrainingManagement.Models.DTOs;

/// <summary>
/// 创建物资类别请求
/// </summary>
public class CreateMaterialCategoryRequest
{
    [Required(ErrorMessage = "类别名称不能为空")]
    [StringLength(50, ErrorMessage = "类别名称长度不能超过50个字符")]
    public string Name { get; set; } = string.Empty;
    
    [StringLength(200, ErrorMessage = "描述长度不能超过200个字符")]
    public string? Description { get; set; }
    
    public int SortOrder { get; set; }
}

/// <summary>
/// 更新物资类别请求
/// </summary>
public class UpdateMaterialCategoryRequest
{
    [Required(ErrorMessage = "类别名称不能为空")]
    [StringLength(50, ErrorMessage = "类别名称长度不能超过50个字符")]
    public string Name { get; set; } = string.Empty;
    
    [StringLength(200, ErrorMessage = "描述长度不能超过200个字符")]
    public string? Description { get; set; }
    
    public int SortOrder { get; set; }
    
    public bool IsActive { get; set; }
}
