Webiant Logo Webiant Logo
  1. No results found.

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

QueuedEmailBuilder.cs

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

namespace Nop.Data.Mapping.Builders.Messages;

/// 
/// Represents a queued email entity builder
/// 
public partial class QueuedEmailBuilder : NopEntityBuilder
{
    #region Methods

    /// 
    /// Apply entity configuration
    /// 
    /// Create table expression builder
    public override void MapEntity(CreateTableExpressionBuilder table)
    {
        table
            .WithColumn(nameof(QueuedEmail.From)).AsString(500).NotNullable()
            .WithColumn(nameof(QueuedEmail.FromName)).AsString(500).Nullable()
            .WithColumn(nameof(QueuedEmail.To)).AsString(500).NotNullable()
            .WithColumn(nameof(QueuedEmail.ToName)).AsString(500).Nullable()
            .WithColumn(nameof(QueuedEmail.ReplyTo)).AsString(500).Nullable()
            .WithColumn(nameof(QueuedEmail.ReplyToName)).AsString(500).Nullable()
            .WithColumn(nameof(QueuedEmail.CC)).AsString(500).Nullable()
            .WithColumn(nameof(QueuedEmail.Bcc)).AsString(500).Nullable()
            .WithColumn(nameof(QueuedEmail.Subject)).AsString(1000).Nullable()
            .WithColumn(nameof(QueuedEmail.EmailAccountId)).AsInt32().ForeignKey();
    }

    #endregion
}