82 lines
2.4 KiB
C#
82 lines
2.4 KiB
C#
using Butter.Types;
|
||
using System.ComponentModel.DataAnnotations;
|
||
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
||
namespace Lactose.Models;
|
||
|
||
/// <summary>
|
||
/// Represents a person with associated metadata and navigation properties.
|
||
/// </summary>
|
||
public class Person {
|
||
/// <summary>
|
||
/// Gets or sets the unique identifier for the person.
|
||
/// </summary>
|
||
[Key]
|
||
public Guid Id { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the name of the person.
|
||
/// </summary>
|
||
[Column(TypeName = "VARCHAR(255)")]
|
||
public string Name { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// Gets or sets the creation date and time of the person record.
|
||
/// </summary>
|
||
[Required]
|
||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||
|
||
/// <summary>
|
||
/// Gets or sets the date and time when the person record was last updated.
|
||
/// </summary>
|
||
public DateTime? UpdatedAt { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the asset ID used as the profile picture for this person.
|
||
/// </summary>
|
||
public Guid? ProfileAssetId { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the horizontal crop offset for the profile picture (0–100, default 50 = center).
|
||
/// </summary>
|
||
public float? ProfileCropX { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the vertical crop offset for the profile picture (0–100, default 50 = center).
|
||
/// </summary>
|
||
public float? ProfileCropY { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the zoom level for the profile picture (1.0 = fit, higher = more zoomed in).
|
||
/// </summary>
|
||
public float? ProfileCropZoom { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the visibility level of the person.
|
||
/// </summary>
|
||
public EVisibility Visibility { get; set; }
|
||
|
||
#region Navigation Properties
|
||
|
||
/// <summary>
|
||
/// Gets or sets the profile picture asset.
|
||
/// </summary>
|
||
public Asset? ProfileAsset { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the list of faces associated with the person.
|
||
/// </summary>
|
||
public List<Face>? Faces { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the list of albums associated with the person.
|
||
/// </summary>
|
||
public List<Album>? Albums { get; set; }
|
||
|
||
/// <summary>
|
||
/// Gets or sets the list of users who maintain this cosplayer.
|
||
/// </summary>
|
||
public List<User>? Maintainers { get; set; }
|
||
|
||
#endregion
|
||
} |