improvements, etc

This commit is contained in:
Loretta 2025-10-11 12:52:55 +02:00
parent 6fecdd2317
commit 28d9122818
4 changed files with 74 additions and 5 deletions

View File

@ -0,0 +1,29 @@
using Mango.Nop.Core.Interfaces;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Orders;
namespace Mango.Nop.Core.Dtos;
public abstract class MgOrderDto : ModelDtoBase<Order>, IMgOrderDto
{
public Guid OrderGuid { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public int StoreId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public int CustomerId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public int OrderStatusId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public int ShippingStatusId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public decimal OrderDiscount { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public decimal OrderTotal { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public DateTime CreatedOnUtc { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public DateTime? PaidDateUtc { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public string ShippingMethod { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public string CustomOrderNumber { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public string CustomValuesXml { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public bool Deleted { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
protected MgOrderDto() :base()
{ }
protected MgOrderDto(int orderId) : base(orderId)
{ }
protected MgOrderDto(Order order) : base(order)
{ }
}

View File

@ -5,7 +5,7 @@ using Nop.Core.Domain.Discounts;
namespace Mango.Nop.Core.Dtos;
public class ProductDto : ModelDtoBase<Product>, IProductDto//, IDiscountSupported<DiscountProductMapping>
public abstract class MgProductDto : ModelDtoBase<Product>, IMgProductDto//, IDiscountSupported<DiscountProductMapping>
{
//public int Id { get; set; }
public int ProductTypeId { get; set; }
@ -25,11 +25,11 @@ public class ProductDto : ModelDtoBase<Product>, IProductDto//, IDiscountSupport
public bool Deleted { get; set; }
public ProductDto() :base()
protected MgProductDto() :base()
{ }
public ProductDto(int productId) : base(productId)
protected MgProductDto(int productId) : base(productId)
{ }
public ProductDto(Product product) : base(product)
protected MgProductDto(Product product) : base(product)
{ }
public override void CopyDtoValuesToEntity(Product entity)

View File

@ -0,0 +1,40 @@
using AyCode.Interfaces.Entities;
using Nop.Core.Domain.Common;
namespace Mango.Nop.Core.Interfaces;
public interface IMgOrderDto : IEntityInt, ISoftDeletedEntity
{
public Guid OrderGuid { get; set; }
public int StoreId { get; set; }
public int CustomerId { get; set; }
public int OrderStatusId { get; set; }
//public OrderStatus OrderStatus
//{
// get => (OrderStatus)OrderStatusId;
// set => OrderStatusId = (int)value;
//}
public int ShippingStatusId { get; set; }
//public ShippingStatus ShippingStatus
//{
// get => (ShippingStatus)ShippingStatusId;
// set => ShippingStatusId = (int)value;
//}
public decimal OrderDiscount { get; set; }
public decimal OrderTotal { get; set; }
public DateTime CreatedOnUtc { get; set; }
public DateTime? PaidDateUtc { get; set; }
public string ShippingMethod { get; set; }
public string CustomOrderNumber { get; set; }
public string CustomValuesXml { get; set; }
public bool Deleted { get; set; }
}

View File

@ -8,7 +8,7 @@ using Nop.Core.Domain.Stores;
namespace Mango.Nop.Core.Interfaces;
public interface IProductDto : IEntityInt, ILocalizedEntity, ISlugSupported, IAclSupported, IStoreMappingSupported/*, IDiscountSupported<DiscountProductMapping>*/, ISoftDeletedEntity
public interface IMgProductDto : IEntityInt, ILocalizedEntity, ISlugSupported, IAclSupported, IStoreMappingSupported/*, IDiscountSupported<DiscountProductMapping>*/, ISoftDeletedEntity
{
int ProductTypeId { get; set; }
int ParentGroupedProductId { get; set; }