using System.ComponentModel.DataAnnotations;

namespace Wishlist.Data.Entities;

public class Wish
{
    public Guid Id { get; set; }
    [MaxLength(50)]
    public string Name { get; set; }
    [MaxLength(2000)]
    public string Description { get; set; }
    public DateTime Created { get; set; }
    public DateTime LastModified { get; set; }
    public bool IsVisible { get; set; }
    public ReserveStatus ReserveStatus { get; set; }
    public PriceInfo Price { get; set; }
    public Uri ImageUrl { get; set; }
    public Uri StoreLink { get; set; }
    public Guid WishlistId { get; set; }
    public Wishlist Wishlist { get; set; } = null!;

    public Wish()
    {
        Id = Guid.NewGuid();
        Created = DateTime.UtcNow;
        LastModified = DateTime.UtcNow;
        IsVisible = false;
        ReserveStatus = ReserveStatus.NotReserve;
        Price = new(0, Constants.DefaultCurrency);
        ImageUrl = new Uri(string.Empty);
        StoreLink = new Uri(string.Empty);
        Description = string.Empty;
        Name = string.Empty;
    }
}