45 lines
1.7 KiB
C#
45 lines
1.7 KiB
C#
using FruitBank.Common;
|
|
using FruitBank.Common.Dtos;
|
|
using FruitBank.Common.Entities;
|
|
using Mango.Nop.Core.Dtos;
|
|
using Mango.Nop.Core.Entities;
|
|
using Nop.Core.Domain.Catalog;
|
|
using Nop.Core.Domain.Orders;
|
|
using Nop.Data.Mapping;
|
|
|
|
namespace Nop.Plugin.Misc.FruitBankPlugin.Mapping;
|
|
|
|
public partial class NameCompatibility : INameCompatibility
|
|
{
|
|
/// <summary>
|
|
/// Gets table name for mapping with the type
|
|
/// </summary>
|
|
public Dictionary<Type, string> TableNames => new Dictionary<Type, string>
|
|
{
|
|
{ typeof(Files), FruitBankConstClient.FilesDbTableName},
|
|
{ typeof(Pallet), FruitBankConstClient.PalletDbTableName},
|
|
{ typeof(Partner), FruitBankConstClient.PartnerDbTableName },
|
|
{ typeof(ProductDto), nameof(Product)},
|
|
|
|
{ typeof(OrderDto), nameof(Order)},
|
|
{ typeof(OrderItemDto), nameof(OrderItem)},
|
|
{ typeof(OrderItemPallet), FruitBankConstClient.OrderItemPalletDbTableName},
|
|
|
|
{ typeof(Shipping), FruitBankConstClient.ShippingDbTableName },
|
|
{ typeof(ShippingDocument), FruitBankConstClient.ShippingDocumentDbTableName },
|
|
{ typeof(ShippingItem), FruitBankConstClient.ShippingItemDbTableName},
|
|
{ typeof(ShippingItemPallet), FruitBankConstClient.ShippingItemPalletDbTableName},
|
|
|
|
{ typeof(ShippingDocumentToFiles), FruitBankConstClient.ShippingDocumentToFilesDbTableName},
|
|
|
|
{ typeof(StockQuantityHistoryDto), nameof(StockQuantityHistory)},
|
|
{ typeof(StockQuantityHistoryExt), FruitBankConstClient.StockQuantityHistoryExtDbTableName},
|
|
|
|
};
|
|
|
|
|
|
/// <summary>
|
|
/// Gets column name for mapping with the entity's property and type
|
|
/// </summary>
|
|
public Dictionary<(Type, string), string> ColumnName => new();
|
|
} |