using System;
using System.ComponentModel.DataAnnotations;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Inventory.Entities;

/// <summary>
/// SKU 批次信息。
/// </summary>
public sealed class InventoryBatch : MultiTenantEntityBase
{
    /// <summary>
    /// 门店标识。
    /// </summary>
    public long StoreId { get; set; }

    /// <summary>
    /// SKU 标识。
    /// </summary>
    public long ProductSkuId { get; set; }

    /// <summary>
    /// 批次编号。
    /// </summary>
    public string BatchNumber { get; set; } = string.Empty;

    /// <summary>
    /// 生产日期。
    /// </summary>
    public DateTime? ProductionDate { get; set; }

    /// <summary>
    /// 过期日期。
    /// </summary>
    public DateTime? ExpireDate { get; set; }

    /// <summary>
    /// 入库数量。
    /// </summary>
    public int Quantity { get; set; }

    /// <summary>
    /// 剩余数量。
    /// </summary>
    public int RemainingQuantity { get; set; }

    /// <summary>
    /// 并发控制字段。
    /// </summary>
    [Timestamp]
    public byte[] RowVersion { get; set; } = Array.Empty<byte>();
}
