using System; using InABox.Core; namespace InABox.Mobile { public abstract class EntityDocumentShell : Shell, IEntityDocumentShell where TModel : ICoreRepository where TEntity : Entity, IPersistent, IRemotable where TEntityLink : IEntityLink where TDocument : Entity, IPersistent, IRemotable, IEntityDocument, new() { protected override void ConfigureColumns(ShellColumns columns) { columns .Map(nameof(ParentID), x => x.EntityLink.ID) .Map(nameof(DocumentID), x => x.DocumentLink.ID) .Map(nameof(FileName), x => x.DocumentLink.FileName) .Map(nameof(Thumbnail), x => x.Thumbnail); } public Guid ParentID { get => Get(); set => Set(value); } public Guid DocumentID { get => Get(); set => Set(value); } public String FileName { get => Get(); set => Set(value); } public byte[] Thumbnail { get => Get(); set => Set(value); } } }