#region ========================================================================= USING ===================================================================================== using Lumina.Application.Common.DataAccess.Entities.Common; using Lumina.Domain.SharedKernel.Common.Enums.AudioLibrary; using Lumina.Domain.SharedKernel.Common.Enums.Common; using Lumina.Domain.SharedKernel.Common.Enums.MediaLibrary; using System; using System.Collections.Generic; using System.Diagnostics; #endregion namespace Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary; /// /// Repository entity for a track, the individual song of an album. /// [DebuggerDisplay("Title: {Title}")] public class TrackEntity : IStorageEntity, IAuditableEntity { /// /// Gets the Id of the track. /// public required Guid Id { get; init; } /// /// Gets or sets the Id of the album the track belongs to. /// public required Guid AlbumId { get; set; } /// /// Gets or sets the Id of the media library this track belongs to. /// public required Guid LibraryId { get; set; } /// /// Gets or sets the file system path of the track. /// public required string Path { get; set; } /// /// Gets or sets the title of the track. /// public required string Title { get; set; } /// /// Gets or sets the original title of the track, if applicable. /// public string? OriginalTitle { get; set; } /// /// Gets or sets the description of the track, if applicable. /// public string? Description { get; set; } /// /// Gets or sets the disambiguation comment of the track, used to distinguish tracks with the same title, if applicable. /// public string? Disambiguation { get; set; } /// /// Gets or sets the original release date of the track, if applicable. /// public DateOnly? OriginalReleaseDate { get; set; } /// /// Gets or sets the original release year of the track, if applicable. /// public int? OriginalReleaseYear { get; set; } /// /// Gets or sets the re-release or reissue date of the track, if applicable. /// public DateOnly? ReReleaseDate { get; set; } /// /// Gets or sets the re-release or reissue year of the track, if applicable. /// public int? ReReleaseYear { get; set; } /// /// Gets or sets the country or region of release, if applicable. /// public ReleaseCountry? ReleaseCountry { get; set; } /// /// Gets or sets the release version or edition of the track, if applicable. /// public string? ReleaseVersion { get; set; } /// /// Gets or sets the ISO 639-1 two-letter language code of the track, if applicable. /// public string? LanguageCode { get; set; } /// /// Gets or sets the full name of the language of the track in English, if applicable. /// public string? LanguageName { get; set; } /// /// Gets or sets the native name of the language of the track, if applicable. /// public string? LanguageNativeName { get; set; } /// /// Gets or sets the ISO 639-1 two-letter original language code of the track, if applicable. /// public string? OriginalLanguageCode { get; set; } /// /// Gets or sets the full name of the original language of the track in English, if applicable. /// public string? OriginalLanguageName { get; set; } /// /// Gets or sets the native name of the original language of the track, if applicable. /// public string? OriginalLanguageNativeName { get; set; } /// /// Gets or sets the duration of the audio in seconds. /// public int DurationInSeconds { get; set; } /// /// Gets or sets the sample rate of the audio in Hz. /// public int SampleRate { get; set; } /// /// Gets or sets the number of audio channels. /// public int Channels { get; set; } /// /// Gets or sets the bit depth of the audio, if applicable. /// public int? BitDepth { get; set; } /// /// Gets or sets the audio codec used, if applicable. /// public string? AudioCodec { get; set; } /// /// Gets or sets the container of the audio file, for example MP3, FLAC, OGG, AAC, MP4 or WAV, if applicable. /// public string? Container { get; set; } /// /// Gets or sets the bitrate of the audio in kbps, if applicable. /// public int? Bitrate { get; set; } /// /// Gets or sets the AcoustID fingerprint identifier of the audio file, if applicable. /// public string? AcoustId { get; set; } /// /// Gets or sets the ReplayGain track gain in decibels, if applicable. /// public decimal? ReplayGainTrackGain { get; set; } /// /// Gets or sets the ReplayGain track peak, if applicable. /// public decimal? ReplayGainTrackPeak { get; set; } /// /// Gets or sets the ReplayGain album gain in decibels, if applicable. /// public decimal? ReplayGainAlbumGain { get; set; } /// /// Gets or sets the ReplayGain album peak, if applicable. /// public decimal? ReplayGainAlbumPeak { get; set; } /// /// Gets or sets the number of the track on its disc. /// public int TrackNumber { get; set; } /// /// Gets or sets the number of the disc the track belongs to, if applicable. /// public int? DiscNumber { get; set; } /// /// Gets or sets the script used by the language of the track, if applicable. /// public string? Script { get; set; } /// /// Gets or sets the musical key of the track, if applicable. /// public MusicKey? Key { get; set; } /// /// Gets or sets the tempo of the track in beats per minute, if applicable. /// public int? Bpm { get; set; } /// /// Gets or sets a value indicating whether the recording of the track is a video recording. /// public bool IsVideo { get; set; } /// /// Gets or sets the title of the work the track is a recording of, if applicable. /// public string? WorkTitle { get; set; } /// /// Gets or sets the MusicBrainz type of the work the track is a recording of, if applicable. /// public string? WorkType { get; set; } /// /// Gets or sets the MusicBrainz identifier of the recording, if applicable. /// public Guid? MusicBrainzRecordingId { get; set; } /// /// Gets or sets the MusicBrainz identifier of the track, if applicable. /// public Guid? MusicBrainzTrackId { get; set; } /// /// Gets or sets the MusicBrainz identifier of the work, if applicable. /// public Guid? MusicBrainzWorkId { get; set; } /// /// Gets or sets the album the track belongs to. /// public AlbumEntity? Album { get; set; } /// /// Gets or sets the list of moods of the track. /// public List Moods { get; set; } = []; /// /// Gets or sets the list of ISRC (International Standard Recording Code) of the track. /// public List Isrcs { get; set; } = []; /// /// Gets or sets the list of the languages of the work the track is a recording of. /// public List WorkLanguages { get; set; } = []; /// /// Gets or sets the list of ISWC (International Standard Musical Work Code) of the work the track is a recording of. /// public List WorkIswcs { get; set; } = []; /// /// Gets or sets the list of the media contributors of the track. /// public List Contributors { get; set; } = []; /// /// Gets or sets the list of ratings for this track. /// public List Ratings { get; set; } = []; /// /// Gets or sets the genres of the track. /// public HashSet Genres { get; set; } = []; /// /// Gets or sets the tags of the track. /// public HashSet Tags { get; set; } = []; /// /// Gets or sets the status of the metadata enrichment of the track. /// public MetadataStatus MetadataStatus { get; set; } /// /// Gets or sets the date and time when the metadata of the track was last enriched. /// public DateTime? LastMetadataUpdateUtc { get; set; } /// /// Gets or sets the name of the plugin that enriched the metadata of the track. /// public string? MetadataProvider { get; set; } /// /// 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; } }