36 lines
950 B
C#
36 lines
950 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Tesses.CMS
|
|
{
|
|
public class Show
|
|
{
|
|
[JsonIgnore]
|
|
public long Id {get;set;}
|
|
|
|
public string ProperName {get;set;}="";
|
|
|
|
public string Name {get;set;}="";
|
|
[JsonIgnore]
|
|
public long UserId {get;set;}
|
|
|
|
public DateTime CreationTime {get;set;}
|
|
public DateTime LastUpdated {get;set;}
|
|
|
|
public string Description {get;set;}="";
|
|
|
|
|
|
|
|
public object Scriban(CMSConfiguration configuration,string user)
|
|
{
|
|
return new {
|
|
Proper = System.Web.HttpUtility.HtmlEncode( ProperName),
|
|
Name = System.Web.HttpUtility.HtmlEncode(Name),
|
|
Description = System.Web.HttpUtility.HtmlEncode(Description),
|
|
Thumbnail = $"{configuration.Root.TrimEnd('/')}/content/{user}/show/{Name}/thumbnail.jpg"
|
|
};
|
|
}
|
|
|
|
}
|
|
} |