75 lines
2.0 KiB
C#
75 lines
2.0 KiB
C#
using Nop.Core.Domain.Catalog;
|
|
using Nop.Core.Domain.Common;
|
|
|
|
namespace Mango.Nop.Core.Dtos;
|
|
|
|
public class ProductDto : ModelDtoBase<Product>, ISoftDeletedEntity
|
|
{
|
|
public int ProductTypeId { get; set; }
|
|
public int ParentGroupedProductId { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
public string ShortDescription { get; set; }
|
|
public string FullDescription { get; set; }
|
|
|
|
public int WarehouseId { get; set; }
|
|
public int StockQuantity { get; set; }
|
|
|
|
public decimal Weight { get; set; }
|
|
public decimal Length { get; set; }
|
|
public decimal Width { get; set; }
|
|
public decimal Height { get; set; }
|
|
|
|
public bool Deleted { get; set; }
|
|
|
|
public ProductDto() :base()
|
|
{ }
|
|
public ProductDto(int product) : base(product)
|
|
{ }
|
|
public ProductDto(Product product) : base(product)
|
|
{ }
|
|
|
|
public override void CopyDtoValuesToEntity(Product entity)
|
|
{
|
|
base.CopyDtoValuesToEntity(entity);
|
|
|
|
entity.ProductTypeId = ProductTypeId;
|
|
entity.ParentGroupedProductId = ParentGroupedProductId;
|
|
|
|
entity.Name = Name;
|
|
entity.ShortDescription = ShortDescription;
|
|
entity.FullDescription = FullDescription;
|
|
|
|
entity.WarehouseId = WarehouseId;
|
|
entity.StockQuantity = StockQuantity;
|
|
|
|
entity.Weight = Weight;
|
|
entity.Length = Length;
|
|
entity.Width = Width;
|
|
entity.Height = Height;
|
|
|
|
entity.Deleted = Deleted;
|
|
}
|
|
|
|
public override void CopyEntityValuesToDto(Product entity)
|
|
{
|
|
base.CopyEntityValuesToDto(entity);
|
|
|
|
ProductTypeId = entity.ProductTypeId;
|
|
ParentGroupedProductId = entity.ParentGroupedProductId;
|
|
|
|
Name = entity.Name;
|
|
ShortDescription = entity.ShortDescription;
|
|
FullDescription = entity.FullDescription;
|
|
|
|
WarehouseId = entity.WarehouseId;
|
|
StockQuantity = entity.StockQuantity;
|
|
|
|
Weight = entity.Weight;
|
|
Length = entity.Length;
|
|
Width = entity.Width;
|
|
Height = entity.Height;
|
|
|
|
Deleted = entity.Deleted;
|
|
}
|
|
} |