| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | using System;using System.Collections.Generic;using System.Linq.Expressions;using InABox.Core;namespace Comal.Classes{    [UserTracking("Notifications")]    public class Notification : Entity, IRemotable, IPersistent, IOneToMany<Job>, ILicense<CoreLicense>    {        [EditorSequence(1)]        [DateTimeEditor(Editable = Editable.Hidden)]        public override DateTime Created        {            get => base.Created;            set => base.Created = value;        }        [EditorSequence(2)]        public EmployeeLink Sender { get; set; }        [EditorSequence(3)]        public EmployeeLink Employee { get; set; }        [EditorSequence(4)]        public JobLink Job { get; set; }        [EditorSequence(5)]        [TextBoxEditor]        public string Title { get; set; }        [EditorSequence(6)]        [RichTextEditor]        public string Description { get; set; }        [EditorSequence(7)]        [TimestampEditor]        public DateTime Closed { get; set; }        [Obsolete("Replaced with Type+EntityID")]        [NullEditor]        public DeliveryLink Delivery { get; set; }        [Obsolete("Replaced with Type+EntityID")]        [NullEditor]        public KanbanLink Kanban { get; set; }        [Obsolete("Replaced with Type+EntityID")]        [NullEditor]        public SetoutLink Setout { get; set; }        [Obsolete("Replaced with Type+EntityID")]        [NullEditor]        public RequisitionLink Requisition { get; set; }        [Obsolete("Replaced with Type+EntityID")]        [NullEditor]        public LeaveRequestLink LeaveRequestLink { get; set; }        [NullEditor]        public string EntityType { get; set; }        [NullEditor]        public Guid EntityID { get; set; }        private class DocumentCountFormula : ComplexFormulaGenerator<Notification, int>        {            public override IComplexFormulaNode<Notification, int> GetFormula() =>                Count<NotificationDocument, Guid>(x => x.Property(x => x.ID)).WithLink(x => x.EntityLink.ID, x => x.ID);        }        [NullEditor]        [ComplexFormula(typeof(DocumentCountFormula))]        public int DocumentCount { get; set; }    }}
 |