diff --git a/src/VirtoCommerce.OrdersModule.Core/Model/LineItem.cs b/src/VirtoCommerce.OrdersModule.Core/Model/LineItem.cs
index 7f61412f..e0f30983 100644
--- a/src/VirtoCommerce.OrdersModule.Core/Model/LineItem.cs
+++ b/src/VirtoCommerce.OrdersModule.Core/Model/LineItem.cs
@@ -27,6 +27,9 @@ public class LineItem : AuditableEntity, IHasTaxDetalization, ISupportCancellati
public virtual decimal PriceWithTax { get; set; }
+ public decimal ListTotal { get; set; }
+ public decimal ListTotalWithTax { get; set; }
+
///
/// Resulting price with discount for one unit
///
@@ -43,6 +46,13 @@ public class LineItem : AuditableEntity, IHasTaxDetalization, ISupportCancellati
///
public virtual decimal DiscountAmount { get; set; }
+ ///
+ /// Indicates whether the discount amount per item was rounded according to the currency settings.
+ /// If false, DiscountAmount and PlacedPrice should not be visible to the customer, as these values may be incorrect;
+ /// in this case, DiscountTotal and ExtendedPrice should be used.
+ ///
+ public bool IsDiscountAmountRounded { get; set; }
+
public virtual decimal DiscountAmountWithTax { get; set; }
public decimal DiscountTotal { get; set; }
diff --git a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj
index 18011af6..9e163106 100644
--- a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj
+++ b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/src/VirtoCommerce.OrdersModule.Data.MySql/Migrations/20241205094730_AddIsDiscountAmountRounded.Designer.cs b/src/VirtoCommerce.OrdersModule.Data.MySql/Migrations/20241205094730_AddIsDiscountAmountRounded.Designer.cs
new file mode 100644
index 00000000..0e36cd86
--- /dev/null
+++ b/src/VirtoCommerce.OrdersModule.Data.MySql/Migrations/20241205094730_AddIsDiscountAmountRounded.Designer.cs
@@ -0,0 +1,2149 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using VirtoCommerce.OrdersModule.Data.Repositories;
+
+#nullable disable
+
+namespace VirtoCommerce.OrdersModule.Data.MySql.Migrations
+{
+ [DbContext(typeof(OrderDbContext))]
+ [Migration("20241205094730_AddIsDiscountAmountRounded")]
+ partial class AddIsDiscountAmountRounded
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.11")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.AddressEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("AddressType")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("City")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CountryCode")
+ .HasMaxLength(3)
+ .HasColumnType("varchar(3)");
+
+ b.Property("CountryName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CustomerOrderId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("Description")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("FirstName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("LastName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Line1")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("Line2")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("Name")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("Organization")
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)");
+
+ b.Property("OuterId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("PaymentInId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("Phone")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("PostalCode")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("RegionId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("RegionName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ShipmentId")
+ .HasColumnType("varchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CustomerOrderId");
+
+ b.HasIndex("PaymentInId");
+
+ b.HasIndex("ShipmentId");
+
+ b.ToTable("OrderAddress", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.CaptureEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Amount")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("CancelReason")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CancelledDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CancelledState")
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.Property("CloseTransaction")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Comment")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Currency")
+ .IsRequired()
+ .HasMaxLength(3)
+ .HasColumnType("varchar(3)");
+
+ b.Property("CustomerOrderId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("IsApproved")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsCancelled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("OuterId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ParentOperationId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("PaymentId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("Status")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Sum")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("TransactionId")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("VendorId")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CustomerOrderId");
+
+ b.HasIndex("PaymentId");
+
+ b.HasIndex("TransactionId", "CustomerOrderId")
+ .IsUnique();
+
+ b.ToTable("OrderCapture", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.CaptureItemEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CaptureId")
+ .IsRequired()
+ .HasColumnType("varchar(128)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LineItemId")
+ .IsRequired()
+ .HasColumnType("varchar(128)");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("OuterId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CaptureId");
+
+ b.HasIndex("LineItemId");
+
+ b.ToTable("OrderCaptureItem", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.ConfigurationItemEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CatalogId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CategoryId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ImageUrl")
+ .HasMaxLength(1028)
+ .HasColumnType("varchar(1028)");
+
+ b.Property("LineItemId")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Name")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("ProductId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("Sku")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LineItemId");
+
+ b.ToTable("OrderConfigurationItem", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.CustomerOrderEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CancelReason")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CancelledDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CancelledState")
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.Property("ChannelId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Comment")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Currency")
+ .IsRequired()
+ .HasMaxLength(3)
+ .HasColumnType("varchar(3)");
+
+ b.Property("CustomerId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CustomerName")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("DiscountAmount")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("DiscountTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("DiscountTotalWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("EmployeeId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("EmployeeName")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("Fee")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("FeeTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("FeeTotalWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("FeeWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("HandlingTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("HandlingTotalWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("IsAnonymous")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsApproved")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsCancelled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsPrototype")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LanguageCode")
+ .HasMaxLength(16)
+ .HasColumnType("varchar(16)");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("OrganizationId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("OrganizationName")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("OuterId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ParentOperationId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("PaymentTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("PaymentTotalWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("PurchaseOrderNumber")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("RowVersion")
+ .IsConcurrencyToken()
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp(6)");
+
+ b.Property("ShippingTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("ShippingTotalWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("ShoppingCartId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Status")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("StoreId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("StoreName")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("SubTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("SubTotalWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("SubscriptionId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("SubscriptionNumber")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Sum")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("TaxPercentRate")
+ .HasColumnType("decimal(18,4)");
+
+ b.Property("TaxTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("Total")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.HasKey("Id");
+
+ b.ToTable("CustomerOrder", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.DiscountEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CouponCode")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CouponInvalidDescription")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("Currency")
+ .IsRequired()
+ .HasMaxLength(3)
+ .HasColumnType("varchar(3)");
+
+ b.Property("CustomerOrderId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("DiscountAmount")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("DiscountAmountWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("LineItemId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("PaymentInId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("PromotionDescription")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("PromotionId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("PromotionName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ShipmentId")
+ .HasColumnType("varchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CustomerOrderId");
+
+ b.HasIndex("LineItemId");
+
+ b.HasIndex("PaymentInId");
+
+ b.HasIndex("ShipmentId");
+
+ b.ToTable("OrderDiscount", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.FeeDetailEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Amount")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("Currency")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CustomerOrderId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("Description")
+ .HasColumnType("longtext");
+
+ b.Property("FeeId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("LineItemId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("PaymentInId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("ShipmentId")
+ .HasColumnType("varchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CustomerOrderId");
+
+ b.HasIndex("LineItemId");
+
+ b.HasIndex("PaymentInId");
+
+ b.HasIndex("ShipmentId");
+
+ b.ToTable("OrderFeeDetail", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.LineItemEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CancelReason")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CancelledDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CatalogId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CategoryId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Comment")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Currency")
+ .IsRequired()
+ .HasMaxLength(3)
+ .HasColumnType("varchar(3)");
+
+ b.Property("CustomerOrderId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("DiscountAmount")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("DiscountAmountWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("Fee")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("FeeWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("FulfillmentCenterId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("FulfillmentCenterName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("FulfillmentLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Height")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal(18,4)");
+
+ b.Property("ImageUrl")
+ .HasMaxLength(1028)
+ .HasColumnType("varchar(1028)");
+
+ b.Property("IsCancelled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsConfigured")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsDiscountAmountRounded")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsGift")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsReccuring")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Length")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal(18,4)");
+
+ b.Property("MeasureUnit")
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("OuterId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Price")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("PriceId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("PriceWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("ProductId")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ProductOuterId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ProductType")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("ShippingMethodCode")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Sku")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Status")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("TaxPercentRate")
+ .HasColumnType("decimal(18,4)");
+
+ b.Property("TaxTotal")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("TaxType")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("VendorId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Weight")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal(18,4)");
+
+ b.Property("WeightUnit")
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.Property("Width")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal(18,4)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CustomerOrderId");
+
+ b.ToTable("OrderLineItem", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.OrderDynamicPropertyObjectValueEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("BooleanValue")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("CaptureId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CustomerOrderId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("DateTimeValue")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DecimalValue")
+ .HasColumnType("decimal(18,5)");
+
+ b.Property("DictionaryItemId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("IntegerValue")
+ .HasColumnType("int");
+
+ b.Property("LineItemId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("Locale")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("LongTextValue")
+ .HasColumnType("longtext");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ObjectId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ObjectType")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("PaymentInId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("PropertyId")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("PropertyName")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("RefundId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("ShipmentId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("ShortTextValue")
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)");
+
+ b.Property("ValueType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CaptureId");
+
+ b.HasIndex("CustomerOrderId");
+
+ b.HasIndex("LineItemId");
+
+ b.HasIndex("PaymentInId");
+
+ b.HasIndex("RefundId");
+
+ b.HasIndex("ShipmentId");
+
+ b.HasIndex("ObjectType", "CustomerOrderId")
+ .HasDatabaseName("IX_OrderDynamicProperty_ObjectType_CustomerOrderId");
+
+ b.HasIndex("ObjectType", "LineItemId")
+ .HasDatabaseName("IX_OrderDynamicProperty_ObjectType_LineItemId");
+
+ b.HasIndex("ObjectType", "ObjectId")
+ .HasDatabaseName("IX_OrderDynamicProperty_ObjectType_ObjectId");
+
+ b.HasIndex("ObjectType", "PaymentInId")
+ .HasDatabaseName("IX_OrderDynamicProperty_ObjectType_PaymentInId");
+
+ b.HasIndex("ObjectType", "RefundId")
+ .HasDatabaseName("IX_OrderDynamicProperty_ObjectType_RefundId");
+
+ b.HasIndex("ObjectType", "ShipmentId")
+ .HasDatabaseName("IX_OrderDynamicProperty_ObjectType_ShipmentId");
+
+ b.ToTable("OrderDynamicPropertyObjectValue", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.PaymentGatewayTransactionEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Amount")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Currency")
+ .HasMaxLength(3)
+ .HasColumnType("varchar(3)");
+
+ b.Property("GatewayIpAddress")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("IsProcessed")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Note")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("PaymentInId")
+ .IsRequired()
+ .HasColumnType("varchar(128)");
+
+ b.Property("ProcessAttemptCount")
+ .HasColumnType("int");
+
+ b.Property("ProcessError")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("ProcessedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("RequestData")
+ .HasColumnType("longtext");
+
+ b.Property("ResponseCode")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ResponseData")
+ .HasColumnType("longtext");
+
+ b.Property("Status")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Type")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PaymentInId");
+
+ b.ToTable("OrderPaymentGatewayTransaction", (string)null);
+ });
+
+ modelBuilder.Entity("VirtoCommerce.OrdersModule.Data.Model.PaymentInEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("AuthorizedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CancelReason")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CancelledDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CancelledState")
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.Property("CapturedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Comment")
+ .HasMaxLength(2048)
+ .HasColumnType("varchar(2048)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Currency")
+ .IsRequired()
+ .HasMaxLength(3)
+ .HasColumnType("varchar(3)");
+
+ b.Property("CustomerId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("CustomerName")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("CustomerOrderId")
+ .HasColumnType("varchar(128)");
+
+ b.Property("DiscountAmount")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("DiscountAmountWithTax")
+ .HasPrecision(18, 4)
+ .HasColumnType("decimal");
+
+ b.Property("GatewayCode")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("IncomingDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("IsApproved")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsCancelled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ModifiedBy")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("OrganizationId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property