| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 | using System;namespace InABox.Core{    public interface IEntityDocument<T> : IEntityDocument where T : IEntityLink    {        T EntityLink { get; set; }    }    [UserTracking(typeof(User))]    public abstract class EntityDocument<T> : Entity, IPersistent, IRemotable, IEntityDocument<T> where T : IEntityLink, new()    {        [EntityRelationship(DeleteAction.SetNull)]        [EditorSequence(2)]        public DocumentTypeLink Type { get; set; }        [EntityRelationship(DeleteAction.Cascade)]        [NullEditor]        public T EntityLink { get; set; }                [EntityRelationship(DeleteAction.Cascade)]        [EditorSequence(1)]        public DocumentLink DocumentLink { get; set; }        [TimestampEditor(Visible = Visible.Optional)]        [EditorSequence(3)]        public DateTime Superceded { get; set; }        [NullEditor]        public byte[]? Thumbnail { get; set; }        //[NullEditor]        //public string Annotations { get; set; }        protected override void Init()        {            base.Init();            EntityLink = new T();            DocumentLink = new DocumentLink();            Type = new DocumentTypeLink();            //Annotations = "";        }    }    public enum EntityDocumentAnnotationType    {        Line,        Ellipse,        Rectangle,        Text,        Ink,        OKStamp,        WarningStamp,        ErrorStamp    }    [UserTracking(typeof(User))]    public class EntityDocumentAnnotation : Entity, IPersistent, IRemotable, ILicense<CoreLicense>    {        public Guid EntityDocument { get; set; }        public int Page { get; set; }        public EntityDocumentAnnotationType Type { get; set; }        public string Data { get; set; }    }}
 |