using System.ComponentModel.DataAnnotations;

namespace WishNinja.Data.Entities;

public class WishlistItem
{
    public int Id { get; set; }

    public int WishlistId { get; set; }
    public Wishlist? Wishlist { get; set; }

    [Required, MaxLength(300)]
    public string Name { get; set; } = string.Empty;

    [MaxLength(2000)]
    public string? Description { get; set; }

    /// <summary>Link to the product/store page.</summary>
    [MaxLength(2000)]
    public string? ProductUrl { get; set; }

    public ImageKind ImageKind { get; set; } = ImageKind.None;

    /// <summary>Relative file name within the uploads directory when <see cref="ImageKind"/> is Uploaded.</summary>
    [MaxLength(260)]
    public string? ImagePath { get; set; }

    public decimal? Price { get; set; }

    /// <summary>1 = highest priority. Lower sorts first within a list.</summary>
    public int Priority { get; set; } = 3;

    /// <summary>How many of this item are wanted. Claims are capped at this quantity.</summary>
    public int Quantity { get; set; } = 1;

    public int SortOrder { get; set; }

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

    public List<Claim> Claims { get; set; } = new();
}
