| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 | using System;using System.Collections.Generic;using System.Linq.Expressions;using InABox.Core;namespace Comal.Classes{    public enum StockMovementBatchType    {        Stocktake,        Receipt,        Issue,        Transfer    }    public class StockMovementBatchDocumentCount : CoreAggregate<StockMovementBatch, StockMovementBatchDocument, Guid>    {        public override Expression<Func<StockMovementBatchDocument, Guid>> Aggregate => x => x.ID;        public override AggregateCalculation Calculation => AggregateCalculation.Count;        public override Dictionary<Expression<Func<StockMovementBatchDocument, object>>, Expression<Func<StockMovementBatch, object>>> Links =>            new Dictionary<Expression<Func<StockMovementBatchDocument, object>>, Expression<Func<StockMovementBatch, object>>>()            {                { StockMovementBatchDocument => StockMovementBatchDocument.EntityLink.ID, StockMovementBatch => StockMovementBatch.ID }            };    }    public interface IStockMovementBatch : IEntity    {    }    [UserTracking(typeof(StockMovement))]    public class StockMovementBatch : Entity, IRemotable, IPersistent, IStockMovementBatch, ILicense<WarehouseLicense>    {        [EnumLookupEditor(typeof(StockMovementBatchType))]        [EditorSequence(1)]        public StockMovementBatchType Type { get; set; }        [TimestampEditor]        [EditorSequence(2)]        public DateTime TimeStamp { get; set; }        [EditorSequence(3)]        public EmployeeLink Employee { get; set; }        [MemoEditor]        [EditorSequence(4)]        public string Notes { get; set; }        [Aggregate(typeof(StockMovementBatchDocumentCount))]        [NullEditor]        public int Documents { get; set; }        public RequisitionLink Requisition { get; set; }    }}
 |