NotificationShell.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using Comal.Classes;
  3. using InABox.Core;
  4. using InABox.Mobile;
  5. namespace PRS.Mobile
  6. {
  7. public class NotificationShell : Shell<NotificationModel,Notification>
  8. {
  9. protected override void ConfigureColumns(ShellColumns<NotificationModel, Notification> columns)
  10. {
  11. columns
  12. .Map(nameof(Created), x => x.Created)
  13. .Map(nameof(Sender), x => x.Sender.Name)
  14. .Map(nameof(Title), x => x.Title)
  15. .Map(nameof(_description), x => x.Description)
  16. .Map(nameof(EntityType), x => x.EntityType)
  17. .Map(nameof(EntityID), x => x.EntityID)
  18. .Map(nameof(Attachments), x=>x.DocumentCount)
  19. .Map(nameof(Closed), x =>x.Closed);
  20. }
  21. public DateTime Created => Get<DateTime>();
  22. public string Sender => Get<String>();
  23. public string Title => Get<String>();
  24. private String _description => Get<String>();
  25. public string Description => _description.StripHTML();
  26. public string EntityType => Get<String>();
  27. public Guid EntityID => Get<Guid>();
  28. public int Attachments => Get<int>();
  29. public DateTime Closed
  30. {
  31. get => Get<DateTime>();
  32. set => Set(value);
  33. }
  34. }
  35. }