using TakeoutSaaS.Domain.Inventory.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Inventory.Entities;

/// <summary>
/// 库存调整记录。
/// </summary>
public sealed class InventoryAdjustment : MultiTenantEntityBase
{
    /// <summary>
    /// 对应的库存记录标识。
    /// </summary>
    public long InventoryItemId { get; set; }

    /// <summary>
    /// 调整类型。
    /// </summary>
    public InventoryAdjustmentType AdjustmentType { get; set; } = InventoryAdjustmentType.Manual;

    /// <summary>
    /// 调整数量，正数增加，负数减少。
    /// </summary>
    public int Quantity { get; set; }

    /// <summary>
    /// 原因说明。
    /// </summary>
    public string? Reason { get; set; }

    /// <summary>
    /// 操作人标识。
    /// </summary>
    public long? OperatorId { get; set; }

    /// <summary>
    /// 发生时间。
    /// </summary>
    public DateTime OccurredAt { get; set; } = DateTime.UtcNow;
}
