Files
MilkyShots/Lactose/Models/Album.cs

70 lines
1.8 KiB
C#

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