2024-07-28 22:59:28 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
namespace Tesses.CMS
|
|
|
|
{
|
|
|
|
public class Album
|
|
|
|
{
|
|
|
|
[JsonIgnore]
|
|
|
|
public long Id {get;set;}
|
|
|
|
[JsonProperty("proper_name")]
|
|
|
|
|
|
|
|
public string ProperName {get;set;}
|
|
|
|
[JsonProperty("name")]
|
|
|
|
public string Name {get;set;}
|
|
|
|
[JsonProperty("album_artist")]
|
|
|
|
public string AlbumArtist {get;set;} = "Unknown Artist";
|
|
|
|
[JsonProperty("tracks")]
|
|
|
|
public List<string> Tracks {get;set;}=new List<string>();
|
|
|
|
[JsonProperty("year")]
|
|
|
|
public int Year {get;set;}=DateTime.Now.Year;
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
public long UserId {get;set;}
|
|
|
|
[JsonProperty("creation_time")]
|
2024-08-10 18:32:16 +00:00
|
|
|
public DateTime CreationTime {get;set;}=DateTime.Now;
|
2024-07-28 22:59:28 +00:00
|
|
|
[JsonProperty("last_updated_time")]
|
2024-08-10 18:32:16 +00:00
|
|
|
public DateTime LastUpdated {get;set;}=DateTime.Now;
|
2024-07-28 22:59:28 +00:00
|
|
|
[JsonProperty("description")]
|
|
|
|
public string Description {get;set;}
|
|
|
|
|
|
|
|
public object Scriban(string thumbnail)
|
|
|
|
{
|
|
|
|
return new {
|
|
|
|
Proper = System.Web.HttpUtility.HtmlEncode( ProperName),
|
|
|
|
Name = System.Web.HttpUtility.HtmlEncode(Name),
|
|
|
|
Description = System.Web.HttpUtility.HtmlEncode(Description),
|
|
|
|
Thumbnail = thumbnail
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|