Webiant Logo Webiant Logo
  1. No results found.

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

LocalizedPropertyMap.cs

using FluentMigrator.Builders.Create.Table;
using Nop.Core.Domain.Localization;
using Nop.Data.Extensions;

namespace Nop.Data.Mapping.Builders.Localization;

/// 
/// Represents a localized property entity builder
/// 
public partial class LocalizedPropertyBuilder : NopEntityBuilder
{
    #region Methods

    /// 
    /// Apply entity configuration
    /// 
    /// Create table expression builder
    public override void MapEntity(CreateTableExpressionBuilder table)
    {
        table
            .WithColumn(nameof(LocalizedProperty.LocaleKeyGroup)).AsString(400).NotNullable()
            .WithColumn(nameof(LocalizedProperty.LocaleKey)).AsString(400).NotNullable()
            .WithColumn(nameof(LocalizedProperty.LocaleValue)).AsString(int.MaxValue).NotNullable()
            .WithColumn(nameof(LocalizedProperty.LanguageId)).AsInt32().ForeignKey();
    }

    #endregion
}