yavsc/src/Yavsc.Abstract/Messaging/Notification.cs

64 lines
1.9 KiB
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Messaging
{
/// <summary>
/// A Notification, that mocks the one sent to Google,
/// since it fits my needs
/// </summary>
public class Notification
{
[Key, DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
/// <summary>
/// The title.
/// </summary>
2017-02-20 15:53:25 +01:00
[Required, Display(Name = "Titre")]
2016-05-17 18:22:18 +02:00
public string title { get; set; }
/// <summary>
/// The body.
/// </summary>
2017-02-20 15:53:25 +01:00
[Required, Display(Name = "Corps")]
2016-05-17 18:22:18 +02:00
public string body { get; set; }
/// <summary>
/// The icon.
/// </summary>
2017-02-20 15:53:25 +01:00
[Display(Name = "Icône")]
2017-09-24 23:42:41 +02:00
public string icon { get; set; }
2016-05-17 18:22:18 +02:00
/// <summary>
/// The sound.
/// </summary>
2017-02-20 15:53:25 +01:00
[Display(Name = "Son")]
2016-05-17 18:22:18 +02:00
public string sound { get; set; }
/// <summary>
/// The tag.
/// </summary>
[Display(Name = "Tag")]
public string tag { get; set; }
/// <summary>
/// The color.
/// </summary>
2017-02-20 15:53:25 +01:00
[Display(Name = "Couleur")]
2016-05-17 18:22:18 +02:00
public string color { get; set; }
/// <summary>
/// The click action.
/// </summary>
2017-02-20 15:53:25 +01:00
[Required, Display(Name = "Label du click")]
2016-05-17 18:22:18 +02:00
public string click_action { get; set; }
2017-05-17 10:41:29 +02:00
/// <summary>
/// When null, this must be seen by everynone.
/// <c>user/{UserId}<c> : it's for this user, and only this one, specified by ID,
/// <c>pub/cga</c> : the public "cga" topic
/// <c>administration</c> : for admins ...
/// </summary>
/// <returns></returns>
public string Target { get; set; }
2017-09-24 23:42:41 +02:00
public Notification()
{
icon = "exclam";
}
2016-05-17 18:22:18 +02:00
}
2017-05-17 10:41:29 +02:00
}