roadie/RoadieLibrary/Models/Artist.cs

105 lines
2.8 KiB
C#
Raw Normal View History

2018-11-02 21:04:49 +00:00
using Newtonsoft.Json;
2018-11-07 04:33:22 +00:00
using Roadie.Library.Models.Collections;
using Roadie.Library.Models.Playlists;
2018-11-06 21:55:31 +00:00
using Roadie.Library.Models.Releases;
using Roadie.Library.Models.Statistics;
using Roadie.Library.Models.Users;
2018-11-02 21:04:49 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
2018-11-06 02:41:51 +00:00
namespace Roadie.Library.Models
2018-11-02 21:04:49 +00:00
{
[Serializable]
public class Artist : EntityModelBase
{
2018-11-11 01:11:58 +00:00
public const string DefaultIncludes = "stats,images,associatedartists,collections,playlists,contributions,labels";
2018-11-06 21:55:31 +00:00
public IEnumerable<ReleaseList> ArtistContributionReleases;
public IEnumerable<LabelList> ArtistLabels;
2018-11-02 21:04:49 +00:00
[MaxLength(100)]
public string AmgId { get; set; }
public string ArtistType { get; set; }
2018-11-06 02:41:51 +00:00
public IEnumerable<DataToken> AssociatedArtists { get; set; }
public IEnumerable<DataToken> AssociatedWithArtists { get; set; }
2018-11-02 21:04:49 +00:00
public string BandStatus { get; set; }
[MaxLength(65535)]
public string BioContext { get; set; }
public DateTime? BirthDate { get; set; }
[MaxLength(50)]
public string DiscogsId { get; set; }
2018-11-06 02:41:51 +00:00
public IEnumerable<DataToken> Genres { get; set; }
2018-11-06 21:55:31 +00:00
public IEnumerable<Image> Images { get; set; }
2018-11-02 21:04:49 +00:00
[MaxLength(65535)]
[JsonIgnore]
[IgnoreDataMember]
public string ISNIList { get; set; }
[JsonProperty("isniList")]
public IEnumerable<string> ISNIListList
{
get
{
if (string.IsNullOrEmpty(this.ISNIList))
{
return null;
}
return this.ISNIList.Split('|');
}
}
[MaxLength(100)]
public string ITunesId { get; set; }
[MaxLength(100)]
public string MusicBrainzId { get; set; }
[MaxLength(250)]
public string Name { get; set; }
[MaxLength(65535)]
public string Profile { get; set; }
public short? Rating { get; set; }
[MaxLength(500)]
public string RealName { get; set; }
2018-11-06 21:55:31 +00:00
public IEnumerable<Releases.ReleaseList> Releases { get; set; }
2018-11-02 21:04:49 +00:00
[MaxLength(100)]
public string SpotifyId { get; set; }
2018-11-06 21:55:31 +00:00
public CollectionStatistics Statistics { get; set; }
2018-11-06 02:41:51 +00:00
public Image Thumbnail { get; set; }
2018-11-02 21:04:49 +00:00
public string Tooltip
{
get
{
return this.Name;
}
}
2018-11-14 03:19:28 +00:00
public UserArtist UserRating { get; set; }
2018-11-06 21:55:31 +00:00
2018-11-07 04:33:22 +00:00
public IEnumerable<CollectionList> CollectionsWithArtistReleases { get; set; }
public IEnumerable<PlaylistList> PlaylistsWithArtistReleases { get; set; }
2018-11-02 21:04:49 +00:00
public Artist()
{
this.BandStatus = "1";
}
}
}