reorg
This commit is contained in:
parent
d000f77098
commit
40e8e08690
3487 changed files with 39 additions and 21 deletions
67
src/Yavsc.Server/Models/EMailing/MailingTemplate.cs
Normal file
67
src/Yavsc.Server/Models/EMailing/MailingTemplate.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using RazorEngine.Templating;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Calendar;
|
||||
using Yavsc.Server.Models.Calendar;
|
||||
|
||||
namespace Yavsc.Server.Models.EMailing
|
||||
{
|
||||
public class MailingTemplate : ITrackedEntity, ITemplateSource
|
||||
{
|
||||
/// <summary>
|
||||
/// Date Created
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public DateTime DateModified
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Key][YaStringLength(3, 256)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[YaStringLength(3, 256)]
|
||||
public string Topic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Markdown template to process
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MaxLength(64*1024)]
|
||||
public string Body { get; set; }
|
||||
|
||||
[EmailAddress()]
|
||||
public string ReplyToAddress { get; set; }
|
||||
|
||||
public Periodicity ToSend { get; set; }
|
||||
|
||||
public string UserCreated
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string UserModified
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Template => Body;
|
||||
public string TemplateFile { get => Id; }
|
||||
|
||||
public TextReader GetTemplateReader()
|
||||
{
|
||||
return new StringReader(Body);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue