Webiant Logo Webiant Logo
  1. No results found.

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

ActivityLogBuilder.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 activity log entity builder
/// 
public partial class ActivityLogBuilder : NopEntityBuilder
{
    #region Methods

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

    #endregion
}