Webiant Logo Webiant Logo
  1. No results found.

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

StoreBuilder.cs

using FluentMigrator.Builders.Create.Table;
using Nop.Core.Domain.Stores;

namespace Nop.Data.Mapping.Builders.Stores;

/// 
/// Represents a store entity builder
/// 
public partial class StoreBuilder : NopEntityBuilder
{
    #region Methods

    /// 
    /// Apply entity configuration
    /// 
    /// Create table expression builder
    public override void MapEntity(CreateTableExpressionBuilder table)
    {
        table
            .WithColumn(nameof(Store.Name)).AsString(400).NotNullable()
            .WithColumn(nameof(Store.Url)).AsString(400).NotNullable()
            .WithColumn(nameof(Store.Hosts)).AsString(1000).Nullable()
            .WithColumn(nameof(Store.CompanyName)).AsString(1000).Nullable()
            .WithColumn(nameof(Store.CompanyAddress)).AsString(1000).Nullable()
            .WithColumn(nameof(Store.CompanyPhoneNumber)).AsString(1000).Nullable()
            .WithColumn(nameof(Store.CompanyVat)).AsString(1000).Nullable();
    }

    #endregion
}