using Butter.Types;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Lactose.Models;
///
/// Represents a person with associated metadata and navigation properties.
///
public class Person {
///
/// Gets or sets the unique identifier for the person.
///
[Key]
public Guid Id { get; set; }
///
/// Gets or sets the name of the person.
///
[Column(TypeName = "VARCHAR(255)")]
public string Name { get; set; } = string.Empty;
///
/// Gets or sets the creation date and time of the person record.
///
[Required]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
///
/// Gets or sets the date and time when the person record was last updated.
///
public DateTime? UpdatedAt { get; set; }
///
/// Gets or sets the asset ID used as the profile picture for this person.
///
public Guid? ProfileAssetId { get; set; }
///
/// Gets or sets the horizontal crop offset for the profile picture (0–100, default 50 = center).
///
public float? ProfileCropX { get; set; }
///
/// Gets or sets the vertical crop offset for the profile picture (0–100, default 50 = center).
///
public float? ProfileCropY { get; set; }
///
/// Gets or sets the zoom level for the profile picture (1.0 = fit, higher = more zoomed in).
///
public float? ProfileCropZoom { get; set; }
///
/// Gets or sets the visibility level of the person.
///
public EVisibility Visibility { get; set; }
#region Navigation Properties
///
/// Gets or sets the profile picture asset.
///
public Asset? ProfileAsset { get; set; }
///
/// Gets or sets the list of faces associated with the person.
///
public List? Faces { get; set; }
///
/// Gets or sets the list of albums associated with the person.
///
public List? Albums { get; set; }
///
/// Gets or sets the list of users who maintain this cosplayer.
///
public List? Maintainers { get; set; }
#endregion
///
/// Gets or sets the total number of albums (before pagination).
/// Populated by FindVisible; ignored by EF Core.
///
[NotMapped]
public int AlbumTotalCount { get; set; }
///
/// Gets or sets the total number of non-deleted assets across all visible albums.
/// Populated by FindVisible; ignored by EF Core.
///
[NotMapped]
public int TotalAssetCount { get; set; }
///
/// Gets or sets the per-album visible asset counts for the paged album list.
/// Populated by FindVisible; ignored by EF Core.
///
[NotMapped]
public Dictionary? AlbumAssetCounts { get; set; }
}