using MilitaryTrainingManagement.Models.Enums;

namespace MilitaryTrainingManagement.Models.Entities;

/// <summary>
/// 消耗记录删改申请
/// </summary>
public class ConsumptionReportChangeRequest
{
    public int Id { get; set; }
    
    /// <summary>
    /// 关联的消耗记录ID
    /// </summary>
    public int ConsumptionReportId { get; set; }
    
    /// <summary>
    /// 关联的消耗记录
    /// </summary>
    public ConsumptionReport ConsumptionReport { get; set; } = null!;
    
    /// <summary>
    /// 申请类型：Delete（删除）或 Modify（修改）
    /// </summary>
    public ChangeRequestType RequestType { get; set; }
    
    /// <summary>
    /// 申请原因
    /// </summary>
    public string Reason { get; set; } = string.Empty;
    
    /// <summary>
    /// 申请状态
    /// </summary>
    public ChangeRequestStatus Status { get; set; } = ChangeRequestStatus.Pending;
    
    /// <summary>
    /// 申请单位ID
    /// </summary>
    public int RequestedByUnitId { get; set; }
    
    /// <summary>
    /// 申请单位
    /// </summary>
    public OrganizationalUnit RequestedByUnit { get; set; } = null!;
    
    /// <summary>
    /// 申请人用户ID
    /// </summary>
    public int RequestedByUserId { get; set; }
    
    /// <summary>
    /// 申请人
    /// </summary>
    public UserAccount RequestedByUser { get; set; } = null!;
    
    /// <summary>
    /// 申请时间
    /// </summary>
    public DateTime RequestedAt { get; set; } = DateTime.UtcNow;
    
    /// <summary>
    /// 处理单位ID
    /// </summary>
    public int? ProcessedByUnitId { get; set; }
    
    /// <summary>
    /// 处理单位
    /// </summary>
    public OrganizationalUnit? ProcessedByUnit { get; set; }
    
    /// <summary>
    /// 处理人用户ID
    /// </summary>
    public int? ProcessedByUserId { get; set; }
    
    /// <summary>
    /// 处理人
    /// </summary>
    public UserAccount? ProcessedByUser { get; set; }
    
    /// <summary>
    /// 处理时间
    /// </summary>
    public DateTime? ProcessedAt { get; set; }
    
    /// <summary>
    /// 处理意见
    /// </summary>
    public string? ProcessComments { get; set; }
}
