using System.ComponentModel.DataAnnotations;

namespace WishNinja.Data.Entities;

/// <summary>
/// A reservation of (part of) a wishlist item by a non-owner. Crucially, claim data is never
/// surfaced to the list owner so the surprise is preserved.
/// </summary>
public class Claim
{
    public int Id { get; set; }

    public int WishlistItemId { get; set; }
    public WishlistItem? WishlistItem { get; set; }

    public string ClaimedByUserId { get; set; } = string.Empty;
    public ApplicationUser? ClaimedByUser { get; set; }

    /// <summary>How many units this claim covers (>= 1).</summary>
    public int Quantity { get; set; } = 1;

    [MaxLength(500)]
    public string? Note { get; set; }

    public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
}
