Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

ShippingByWeightByTotalRecordBuilder.cs

using FluentMigrator.Builders.Create.Table;
using Nop.Data.Mapping.Builders;
using Nop.Plugin.Shipping.FixedByWeightByTotal.Domain;

namespace Nop.Plugin.Shipping.FixedByWeightByTotal.Data;

public class ShippingByWeightByTotalRecordBuilder : NopEntityBuilder
{
    public override void MapEntity(CreateTableExpressionBuilder table)
    {
        table
            .WithColumn(nameof(ShippingByWeightByTotalRecord.WeightFrom))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.WeightTo))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.OrderSubtotalFrom))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.OrderSubtotalTo))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.AdditionalFixedCost))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.PercentageRateOfSubtotal))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.RatePerWeightUnit))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.LowerWeightLimit))
            .AsDecimal(18, 4)
            .WithColumn(nameof(ShippingByWeightByTotalRecord.Zip))
            .AsString(400)
            .Nullable();
    }
}