using System.ComponentModel.Design; using AyCode.Core.Serializers.Toons; using AyCode.Interfaces.Entities; using AyCode.Interfaces.TimeStampInfo; using LinqToDB.Mapping; namespace Mango.Nop.Core.Entities; public interface IMgStockTaking : IEntityInt, ITimeStampInfo { public DateTime StartDateTime { get; set; } public bool IsClosed { get; set; } public bool IsReadyForClose(); } [ToonDescription("Base entity for stock taking sessions with items")] public abstract class MgStockTaking : MgEntityBase, IMgStockTaking where TStockTakingItem : class, IMgStockTakingItem { public DateTime StartDateTime { get; set; } public bool IsClosed { get; set; } public abstract bool IsReadyForClose(); [Association(ThisKey = nameof(Id), OtherKey = nameof(IMgStockTakingItem.StockTakingId), CanBeNull = true)] public List? StockTakingItems { get; set; } public int Creator { get; set; } public DateTime Created { get; set; } public DateTime Modified { get; set; } }