| 12345678910111213141516171819202122232425262728293031323334 |
- using System;
- using Comal.Classes;
- namespace comal.timesheets
- {
- public class NotificationShell : Shell<NotificationModel,Notification>
- {
- static NotificationShell()
- {
- Columns
- .Map(nameof(ID), x => x.ID)
- .Map(nameof(Created), x => x.Created)
- .Map(nameof(Sender), x => x.Sender.Name)
- .Map(nameof(Title), x => x.Title)
- .Map(nameof(Description), x => x.Description)
- .Map(nameof(EntityType), x => x.EntityType)
- .Map(nameof(EntityID), x => x.EntityID)
- .Map(nameof(Attachments), x=>x.DocumentCount);
- }
- public Guid ID => Get<Guid>();
- public DateTime Created => Get<DateTime>();
- public string Sender => Get<String>();
- public string Title => Get<String>();
- public string Description => Get<String>();
- public string EntityType => Get<String>();
- public Guid EntityID => Get<Guid>();
- public int Attachments => Get<int>();
-
- public bool ImageVisible => Attachments > 0;
- }
- }
|