using Newtonsoft.Json; using System; namespace zero.Web.Models { public abstract class EditModel { /// /// Id of the entity /// public string Id { get; set; } /// /// Whether this entity can be edited or only viewed /// public bool CanEdit { get; set; } /// /// Meta data for the entity /// public EditModelMeta Meta { get; set; } = new EditModelMeta(); } public class EditModelMeta { /// /// The change token maps to a database entity which holds ID and collection of the model to edit /// If these values do not match the entity on save it is rejected /// // TODO expiration expiry session.Advanced.GetMetadataFor(user)[Raven.Client.Constants.Documents.Metadata.Expires] = DateTime.UtcNow.AddMinutes(60); /// public string Token { get; set; } } }