Compare commits

..

No commits in common. "99bfaf960bb0d68c9ce217914019296cc6890b8d" and "b21197ca67c305a3f9f2b6e237954f47182c351c" have entirely different histories.

7 changed files with 7 additions and 85 deletions

View File

@ -1,5 +1,4 @@
using AyCode.Core.Interfaces;
using Nop.Core;
using Nop.Core;
namespace Mango.Nop.Core.Dtos;

View File

@ -1,29 +0,0 @@
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; }
}

View File

@ -1,41 +0,0 @@
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; }
}

View File

@ -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.11" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
</ItemGroup>
<ItemGroup>

View File

@ -3,15 +3,8 @@ using Mango.Nop.Core.Interfaces;
namespace Mango.Nop.Core.Models;
public class MgLoginModelRequest : IAcModelDtoBaseEmpty
public class MgLoginModelRequest(string email, string password) : IAcModelDtoBaseEmpty
{
public MgLoginModelRequest(){}
public MgLoginModelRequest(string email, string password)
{
Email = email;
Password = password;
}
public string Email { get; set; }
public string Password { get; set; }
public string Email { get; set; } = email;
public string Password { get; set; } = password;
}

View File

@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="MessagePack" Version="3.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
</ItemGroup>
<ItemGroup>

View File

@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="MessagePack" Version="3.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
</ItemGroup>
<ItemGroup>