#region ========================================================================= USING =====================================================================================
using Nemera.Application.Common.DataAccess.Entities.Common;
using Nemera.Domain.SharedKernel.Common.Enums.AudioLibrary;
using Nemera.Domain.SharedKernel.Common.Enums.MediaLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Nemera.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary;
///
/// Repository entity for an artist.
///
[DebuggerDisplay("Name: {Name}")]
public class ArtistEntity : IStorageEntity, IAuditableEntity
{
///
/// Gets the Id of the artist.
///
public required Guid Id { get; init; }
///
/// Gets or sets the Id of the media library this artist belongs to.
///
public required Guid LibraryId { get; set; }
///
/// Gets or sets the name of the artist.
///
public required string Name { get; set; }
///
/// Gets or sets the sort name of the artist, a variant of the name used when sorting artists, if applicable.
///
public string? SortName { get; set; }
///
/// Gets or sets the disambiguation comment of the artist, used to distinguish artists with the same name, if applicable.
///
public string? Disambiguation { get; set; }
///
/// Gets or sets the type of the artist, if applicable.
///
public MusicArtistType? Type { get; set; }
///
/// Gets or sets the gender of the artist, applicable only to artists that are persons or characters, if applicable.
///
public MusicArtistGender? Gender { get; set; }
///
/// Gets or sets the ISO 3166-1 alpha-2 code of the country the artist is associated with, if applicable.
///
public string? Country { get; set; }
///
/// Gets or sets the date the artist started existing, if applicable.
///
public DateOnly? LifeSpanBegin { get; set; }
///
/// Gets or sets the date the artist stopped existing, if applicable.
///
public DateOnly? LifeSpanEnd { get; set; }
///
/// Gets or sets a value indicating whether the artist no longer exists.
///
public bool IsEnded { get; set; }
///
/// Gets or sets the website of the artist, if applicable.
///
public string? Website { get; set; }
///
/// Gets or sets the MusicBrainz identifier of the artist, if applicable.
///
public Guid? MusicBrainzArtistId { get; set; }
///
/// Gets or sets the area the artist is primarily identified with, if applicable.
///
public MusicAreaEntity? Area { get; set; }
///
/// Gets or sets the area the artist began in, if applicable.
///
public MusicAreaEntity? BeginArea { get; set; }
///
/// Gets or sets the area the artist ended in, if applicable.
///
public MusicAreaEntity? EndArea { get; set; }
///
/// Gets or sets the list of alternative names of the artist.
///
public List Aliases { get; set; } = [];
///
/// Gets or sets the list of IPI (Interested Party Information) codes of the artist.
///
public List Ipis { get; set; } = [];
///
/// Gets or sets the list of ISNI (International Standard Name Identifier) codes of the artist.
///
public List Isnis { get; set; } = [];
///
/// Gets or sets the genres of the artist.
///
public HashSet Genres { get; set; } = [];
///
/// Gets or sets the tags of the artist.
///
public HashSet Tags { get; set; } = [];
///
/// Gets or sets the list of ratings of the artist.
///
public List Ratings { get; set; } = [];
///
/// Gets or sets the albums of the artist.
///
public List Albums { get; set; } = [];
///
/// Gets or sets the list of the media contributors that make up the artist.
///
public List Contributors { get; set; } = [];
///
/// Gets or sets the status of the metadata enrichment of the artist.
///
public MetadataStatus MetadataStatus { get; set; }
///
/// Gets or sets the date and time when the metadata of the artist was last enriched.
///
public DateTime? LastMetadataUpdateUtc { get; set; }
///
/// Gets or sets the name of the plugin that enriched the metadata of the artist.
///
public string? MetadataProvider { get; set; }
///
/// Gets or sets a value indicating whether the artist was deleted by the user and is waiting to be restored or permanently removed.
/// A deleted artist is kept out of every catalogue read and is not materialized again by scans, so that an automatic scan never undoes the deletion.
///
public bool IsDeleted { get; set; }
///
/// Gets or sets the date and time when the artist was deleted, or when the artist is not deleted.
///
public DateTime? DeletedOnUtc { get; set; }
///
/// Gets or sets the time and date when the entity was added.
///
public DateTime CreatedOnUtc { get; set; }
///
/// Gets or sets the Id of the user that created the entity.
///
public 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 Guid? UpdatedBy { get; set; }
}