123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using System;
- using System.Collections.Generic;
- using System.Linq.Expressions;
- using InABox.Core;
- namespace Comal.Classes
- {
- public class NotificationDocumentCount : CoreAggregate<Notification, NotificationDocument, Guid>
- {
- public override Expression<Func<NotificationDocument, Guid>> Aggregate => x => x.ID;
- public override AggregateCalculation Calculation => AggregateCalculation.Count;
- public override Dictionary<Expression<Func<NotificationDocument, object>>, Expression<Func<Notification, object>>> Links =>
- new Dictionary<Expression<Func<NotificationDocument, object>>, Expression<Func<Notification, object>>>()
- {
- { NotificationDocument => NotificationDocument.EntityLink.ID, Notification => Notification.ID }
- };
- }
-
- [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; }
-
- [NullEditor]
- [Aggregate(typeof(NotificationDocumentCount))]
- public int DocumentCount { get; set; }
- }
- }
|