using System.ComponentModel.DataAnnotations;

namespace WishNinja.Data.Entities;

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

    /// <summary>Owner of the list. The owner never sees claim information for their own items.</summary>
    public string OwnerId { get; set; } = string.Empty;
    public ApplicationUser? Owner { get; set; }

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

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

    public WishlistVisibility Visibility { get; set; } = WishlistVisibility.AllMembers;

    public bool IsArchived { get; set; }

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

    public List<WishlistItem> Items { get; set; } = new();

    /// <summary>Explicit shares; only meaningful when <see cref="Visibility"/> is SpecificUsers.</summary>
    public List<WishlistShare> Shares { get; set; } = new();
}
