EventSubscriber.cs 925 B

1234567891011121314151617181920212223242526272829303132
  1. using InABox.Core;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace Comal.Classes
  6. {
  7. public enum EventSubscriberType
  8. {
  9. Notification,
  10. Email
  11. }
  12. public class EventSubscriber : Entity, IRemotable, IPersistent, IManyToMany<Event, Employee>, ILicense<CoreLicense>
  13. {
  14. public EventLink Event { get; set; }
  15. [EditorSequence(1)]
  16. public EmployeeLink Employee { get; set; }
  17. [EditorSequence(2)]
  18. public EventSubscriberType SubscriberType { get; set; } = EventSubscriberType.Notification;
  19. static EventSubscriber()
  20. {
  21. DefaultColumns.Add<EventSubscriber>(x => x.Event.Code);
  22. DefaultColumns.Add<EventSubscriber>(x => x.Employee.Code);
  23. DefaultColumns.Add<EventSubscriber>(x => x.Employee.Name);
  24. DefaultColumns.Add<EventSubscriber>(x => x.SubscriberType);
  25. }
  26. }
  27. }