feat(notifications): additive Transport column on SmtpConfigurations
This commit is contained in:
@@ -14,6 +14,14 @@ public class SmtpConfiguration
|
||||
public string? Credentials { get; set; }
|
||||
/// <summary>Gets or sets the TLS mode (None, StartTLS, or SSL), or null to use the provider default.</summary>
|
||||
public string? TlsMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email delivery transport ("Smtp" or "Ews"). Null/empty means Smtp
|
||||
/// (legacy rows). Under Ews, <see cref="Host"/> holds the full EWS endpoint URL,
|
||||
/// <see cref="AuthType"/> must be Basic, and Port/TlsMode/OAuth2* are unused.
|
||||
/// </summary>
|
||||
public string? Transport { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the sender address placed in the From header.</summary>
|
||||
public string FromAddress { get; set; }
|
||||
/// <summary>Gets or sets the connection timeout in seconds.</summary>
|
||||
|
||||
+4
@@ -124,6 +124,10 @@ public class SmtpConfigurationConfiguration : IEntityTypeConfiguration<SmtpConfi
|
||||
builder.Property(s => s.TlsMode)
|
||||
.HasMaxLength(50);
|
||||
|
||||
// Email transport discriminator ("Smtp"/"Ews"); null = Smtp for pre-EWS rows.
|
||||
builder.Property(s => s.Transport)
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(s => s.FromAddress)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500);
|
||||
|
||||
+2094
File diff suppressed because it is too large
Load Diff
+29
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddSmtpConfigurationTransport : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Transport",
|
||||
table: "SmtpConfigurations",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Transport",
|
||||
table: "SmtpConfigurations");
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
@@ -1064,6 +1064,10 @@ namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Migrations
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Transport")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SmtpConfigurations");
|
||||
|
||||
Reference in New Issue
Block a user