clean up for mailing

This commit is contained in:
Paul Schneider
2021-06-03 15:12:29 +01:00
parent 691d445ae0
commit a09295968e
14 changed files with 2934 additions and 116 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Attributes.Validation;
using Yavsc.Models;
using Yavsc.Models.Calendar;
@ -23,10 +24,10 @@ namespace Yavsc.Server.Models.EMailing
set;
}
[Key][MaxLength(256),MinLength(3)]
[Key][YaStringLength(3, 256)]
public string Id { get; set; }
[MaxLength(256),MinLength(3)]
[YaStringLength(3, 256)]
public string Topic { get; set; }
/// <summary>
@ -39,28 +40,9 @@ namespace Yavsc.Server.Models.EMailing
[EmailAddress()]
public string ReplyToAddress { get; set; }
[ForeignKey("ManagerId")]
public virtual ApplicationUser Manager { get; set; }
public Periodicity ToSend { get; set; }
[Required]
public string ManagerId
{
get;
set;
}
[Required]
public string SuccessorId
{
get;
set;
}
[ForeignKey("SuccessorId")]
public virtual ApplicationUser Successor { get; set; }
public string UserCreated
{
get;