#region ========================================================================= USING ===================================================================================== using Lumina.Application.Common.DataAccess.Entities.Common; using Lumina.Application.Common.DataAccess.Entities.UsersManagement; using Lumina.Domain.Common.Enums.MediaLibrary; using System; using System.Collections.Generic; using System.Diagnostics; #endregion namespace Lumina.Application.Common.DataAccess.Entities.MediaLibrary.Management; /// /// Repository entity for a media library. /// [DebuggerDisplay("Title: {Title}")] public class LibraryEntity : IStorageEntity, IAuditableEntity { /// /// Gets the Id of the media library. /// public required Guid Id { get; init; } /// /// Gets the Id of the user that owns the media library. /// public required Guid UserId { get; init; } /// /// Gets or sets the title of the media library. /// public required string Title { get; set; } /// /// Gets or sets the path of the image file used as the cover for the library. /// public string? CoverImage { get; set; } /// /// Gets or sets the type of the media library. /// public required LibraryType LibraryType { get; set; } /// /// Gets the list of file system paths that make up the media library. /// public required ICollection ContentLocations { get; init; } = []; /// /// Gets the list of scans of the media library. /// public ICollection LibraryScans { get; init; } = []; /// /// Gets whether this media library is enabled or not. A disabled media library is never shown or changed. /// public bool IsEnabled { get; init; } /// /// Gets whether this media library is locked or not. A locked media library is displayed, but is never changed or updated. /// public bool IsLocked { get; init; } /// /// Gets whether this media library should update the metadata of its elements from the web, or not. /// public bool DownloadMedatadaFromWeb { get; init; } /// /// Gets whether this media library should copy the downloaded metadata into the media library content locations, or not. /// public bool SaveMetadataInMediaDirectories { get; init; } /// /// Gets the user that owns the media library. /// public UserEntity User { get; init; } = null!; /// /// Gets or sets the time and date when the entity was added. /// public required DateTime CreatedOnUtc { get; set; } /// /// Gets or sets the Id of the user that created the entity. /// public required Guid CreatedBy { get; set; } /// /// Gets or sets the optional time and date when the entity was updated. /// public DateTime? UpdatedOnUtc { get; set; } /// /// Gets or sets the optional Id of the user that updated the entity. /// public required Guid? UpdatedBy { get; set; } }