using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.ComponentModel.DataAnnotations; using Sleis.Validation.Attribute; namespace Sleis.Models { public class AppEventModel : BaseIdentityModel { public virtual EventType Type { get; set; } public virtual DateTime On { get; set; } [Required (ErrorMessage=Constants.RequiredErrorMessage)] public virtual string Username { get; set; } [Required (ErrorMessage=Constants.RequiredErrorMessage)] public virtual string Text { get; set; } public virtual string Data { get; set; } public virtual EventRecordType RecordType { get; set; } public virtual string RecordId { get; set; } public virtual string Source { get; set; } public AppEventModel() { } public AppEventModel(EventType type, string user, string text, string source) { Type = type; On = DateTime.Now; Username = user; Text = text; Source = source; } } }