using Butter.Dtos.Album;
using Butter.Types;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Lactose.Models;
///
/// Represents an album entity.
///
public class Album {
///
/// Gets or sets the unique identifier for the album.
///
[Key]
public Guid Id { get; set; }
///
/// Gets or sets the title of the album.
///
[Column(TypeName = "VARCHAR(255)")]
public string Title { get; set; } = string.Empty;
///
/// Gets or sets the creation date of the album.
///
[Required]
public DateTime? CreatedAt { get; set; } = DateTime.UtcNow;
///
/// Gets or sets the last updated date of the album.
///
public DateTime? UpdatedAt { get; set; }
///
/// Gets or sets the person owner identifier.
///
[ForeignKey(nameof(PersonOwner))]
public Guid? PersonOwnerId { get; set; }
///
/// Gets or sets the cover asset identifier.
///
[ForeignKey(nameof(CoverAsset))]
public Guid? CoverAssetId { get; set; }
///
/// Gets or sets the visibility level of the album.
///
public EVisibility Visibility { get; set; }
#region Navigation Properties
///
/// Gets or sets the person owner of the album. This is the person/model who appears in the album.
///
public Person? PersonOwner { get; set; }
///
/// Gets or sets the list of assets associated with the album.
///
public List? Assets { get; set; }
///
/// Gets or sets the cover asset for this album.
///
public Asset? CoverAsset { get; set; }
#endregion
///
/// Gets or sets the visibility-filtered asset previews for the album detail view.
/// Populated by FindVisible; ignored by EF Core.
///
[NotMapped]
public List? VisibleAssetPreviews { get; set; }
}