.Net10, VS2026; StockTaking in progress...
This commit is contained in:
parent
b21197ca67
commit
120ed09738
|
|
@ -0,0 +1,25 @@
|
|||
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 abstract class MgStockTaking<TStockTakingItem> : MgEntityBase, IMgStockTaking where TStockTakingItem : class, IMgStockTakingItem
|
||||
{
|
||||
public DateTime StartDateTime { get; set; }
|
||||
public bool IsClosed { get; set; }
|
||||
|
||||
[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; }
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using LinqToDB;
|
||||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Dtos;
|
||||
using Mango.Nop.Core.Interfaces;
|
||||
|
||||
namespace Mango.Nop.Core.Entities;
|
||||
|
||||
public interface IMgStockTakingItem : IEntityInt, ITimeStampInfo
|
||||
{
|
||||
public int StockTakingId { get; set; }
|
||||
public int ProductId { get; set; }
|
||||
|
||||
public bool IsMeasured { get; set; }
|
||||
|
||||
public int OriginalStockQuantity { get; set; }
|
||||
public int MeasuredStockQuantity { get; set; }
|
||||
}
|
||||
|
||||
public abstract class MgStockTakingItem<TStockTaking, TProduct> : MgEntityBase, IMgStockTakingItem
|
||||
where TStockTaking : class, IMgStockTaking where TProduct : class, IMgProductDto
|
||||
{
|
||||
public int StockTakingId { get; set; }
|
||||
public int ProductId { get; set; }
|
||||
|
||||
public bool IsMeasured { get; set; }
|
||||
|
||||
public int OriginalStockQuantity { get; set; }
|
||||
public int MeasuredStockQuantity { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(StockTakingId), OtherKey = nameof(IMgStockTaking.Id), CanBeNull = true)]
|
||||
public TStockTaking? StockTaking{ get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(ProductId), OtherKey = nameof(IMgProductDto.Id), CanBeNull = true)]
|
||||
public TProduct? Product { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="linq2db" Version="5.4.1" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.11" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.11" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.11" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue