2018-11-15 04:25:40 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Roadie.Library.Models
|
|
|
|
|
{
|
|
|
|
|
[Serializable]
|
2019-11-24 21:58:38 +00:00
|
|
|
|
public sealed class GenreList : EntityInfoModelBase
|
2018-11-15 04:25:40 +00:00
|
|
|
|
{
|
2019-07-03 16:21:29 +00:00
|
|
|
|
public int? ArtistCount { get; set; }
|
2018-11-15 04:25:40 +00:00
|
|
|
|
public DataToken Genre { get; set; }
|
2018-12-28 18:58:17 +00:00
|
|
|
|
public int? ReleaseCount { get; set; }
|
2019-08-02 20:59:24 +00:00
|
|
|
|
public Image Thumbnail { get; set; }
|
2019-11-24 21:58:38 +00:00
|
|
|
|
|
|
|
|
|
public static GenreList FromDataGenre(Data.Genre genre, Image genreThumbnail, int? artistCount, int? releaseCount)
|
|
|
|
|
{
|
|
|
|
|
return new GenreList
|
|
|
|
|
{
|
|
|
|
|
Id = genre.RoadieId,
|
|
|
|
|
Genre = new DataToken
|
|
|
|
|
{
|
|
|
|
|
Text = genre.Name,
|
|
|
|
|
Value = genre.RoadieId.ToString()
|
|
|
|
|
},
|
|
|
|
|
SortName = genre.SortName,
|
|
|
|
|
CreatedDate = genre.CreatedDate,
|
|
|
|
|
LastUpdated = genre.LastUpdated,
|
|
|
|
|
ArtistCount = artistCount,
|
|
|
|
|
ReleaseCount = releaseCount,
|
|
|
|
|
Thumbnail = genreThumbnail
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-11-15 04:25:40 +00:00
|
|
|
|
}
|
2019-07-03 16:21:29 +00:00
|
|
|
|
}
|