namespace ERPCore.Domain.Entities;

/// <summary>
/// One warranty number captured against a single received unit of a warranty-tracked
/// item (<see cref="Item.Warranty"/> = <see cref="Enums.Warranty.Warranty"/>). A GRN line
/// for such an item must carry exactly <see cref="GrnLine.Qty"/> of these — one per unit —
/// mirroring how a Serial-tracked item requires one serial per unit (docs/10 Part C.3).
/// </summary>
public class GrnLineWarrantyNumber
{
    public int GrnLineWarrantyNumberId { get; set; }

    public int GrnLineId { get; set; }
    public GrnLine? GrnLine { get; set; }

    public string WarrantyNo { get; set; } = string.Empty;

    /// <summary>Warranty coverage length in months, selected at receipt (e.g. 3/6/12/18).</summary>
    public int WarrantyPeriodMonths { get; set; }
}
