Webiant Logo Webiant Logo
  1. No results found.

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

LogBuilder.cs

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

namespace Nop.Data.Mapping.Builders.Logging;

/// 
/// Represents a log entity builder
/// 
public partial class LogBuilder : NopEntityBuilder
{
    #region Methods

    /// 
    /// Apply entity configuration
    /// 
    /// Create table expression builder
    public override void MapEntity(CreateTableExpressionBuilder table)
    {
        table
            .WithColumn(nameof(Log.ShortMessage)).AsString(int.MaxValue).NotNullable()
            .WithColumn(nameof(Log.IpAddress)).AsString(100).Nullable()
            .WithColumn(nameof(Log.CustomerId)).AsInt32().Nullable().ForeignKey();
    }

    #endregion
}