using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using InABox.Clients; using InABox.Core; namespace Comal.Classes { public enum PaperSize { A0, A1, A2, A3, A4, A5, Custom, NotSet } public class JobDocumentSet : Entity, IRemotable, IPersistent, IOneToMany, IJobDocumentSet, ILicense { [EntityRelationship(DeleteAction.Cascade)] [NullEditor] public JobLink Job { get; set; } [EntityRelationship(DeleteAction.Cascade)] [NullEditor] public JobDocumentSetFolderLink Folder { get; set; } [NullEditor] [EntityRelationship(DeleteAction.Cascade)] public JobDocumentSetLink Parent { get; set; } [CodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)] [EditorSequence(1)] public string Code { get; set; } [TextBoxEditor] [EditorSequence(2)] public string Description { get; set; } [EditorSequence(3)] public JobDocumentSetDisciplineLink Discipline { get; set; } [EditorSequence(4)] public JobDocumentSetTypeLink Type { get; set; } [DateTimeEditor] [EditorSequence(5)] public DateTime Date { get; set; } [Caption("Assigned To")] [EditorSequence(6)] public EmployeeLink Employee { get; set; } [EnumLookupEditor(typeof(PaperSize))] [EditorSequence("Advanced", 1)] public PaperSize Size { get; set; } = PaperSize.NotSet; [CodeEditor(Editable = Editable.Enabled)] [EditorSequence("Advanced", 2)] public string Scale { get; set; } = ""; [EditorSequence("Advanced", 3)] public JobDocumentSetCategoryLink Category { get; set; } [EditorSequence("Advanced", 4)] public JobITPLink Area { get; set; } [EditorSequence("Advanced", 5)] public DateTime Retired { get; set; } /*[Aggregate(typeof(JobDocumentSetCurrentAggregate))] public DateTime Current { get; set; }*/ } /* public class JobDocumentSetCurrentAggregate : CoreAggregate { public override Expression> Aggregate => x => x.Date; public override Dictionary>, Expression>> Links => throw new NotImplementedException(); public override AggregateCalculation Calculation => throw new NotImplementedException(); }*/ }