more friendly

This commit is contained in:
2017-09-24 23:42:41 +02:00
parent 68c8ff2a58
commit 109aa1bc55
11 changed files with 763 additions and 264 deletions

View File

@ -54,7 +54,7 @@ namespace Yavsc.Models
builder.Entity<HyperLink>().HasKey(l=>new { l.HRef, l.Method });
builder.Entity<Period>().HasKey(l=>new { l.Start, l.End });
builder.Entity<Models.Cratie.Option>().HasKey( o => new { o.Code, o.CodeScrutin });
builder.Entity<Notification>().Property(n=> n.icon).HasDefaultValue("exclam");
foreach (var et in builder.Model.GetEntityTypes()) {
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
et.FindProperty("DateCreated").IsReadOnlyAfterSave = true;

View File

@ -25,7 +25,7 @@ namespace Yavsc.Models.Messaging
/// The icon.
/// </summary>
[Display(Name = "Icône")]
public string icon { get; set; }
public string icon { get; set; }
/// <summary>
/// The sound.
/// </summary>
@ -55,5 +55,10 @@ namespace Yavsc.Models.Messaging
/// </summary>
/// <returns></returns>
public string Target { get; set; }
public Notification()
{
icon = "exclam";
}
}
}