Mango.Nop.Libraries/Mango.Nop.Core/Entities/MgStockTaking.cs

29 lines
934 B
C#

using System.ComponentModel.Design;
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();
}
public abstract class MgStockTaking<TStockTakingItem> : 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<TStockTakingItem>? StockTakingItems { get; set; }
public int Creator { get; set; }
public DateTime Created { get; set; }
public DateTime Modified { get; set; }
}