//
using System;
using LY.MicroService.WebhooksManagement.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.WebhooksManagement.Migrations
{
[DbContext(typeof(WebhooksManagementMigrationsDbContext))]
[Migration("20220409053632_Reset-Field-Secret-To-Not-Required")]
partial class ResetFieldSecretToNotRequired
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "6.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property("Data")
.HasMaxLength(2147483647)
.HasColumnType("longtext")
.HasColumnName("Data");
b.Property("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property("TenantId")
.HasColumnType("char(36)");
b.Property("WebhookName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnName("WebhookName");
b.HasKey("Id");
b.ToTable("AbpWebhooksEvents", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property("Response")
.HasMaxLength(2147483647)
.HasColumnType("longtext")
.HasColumnName("Response");
b.Property("ResponseStatusCode")
.HasColumnType("int");
b.Property("TenantId")
.HasColumnType("char(36)");
b.Property("WebhookEventId")
.HasColumnType("char(36)");
b.Property("WebhookSubscriptionId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("WebhookEventId");
b.ToTable("AbpWebhooksSendAttempts", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property("Headers")
.HasMaxLength(2147483647)
.HasColumnType("longtext")
.HasColumnName("Headers");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Secret")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("Secret");
b.Property("TenantId")
.HasColumnType("char(36)");
b.Property("WebhookUri")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasColumnName("WebhookUri");
b.Property("Webhooks")
.HasMaxLength(2147483647)
.HasColumnType("longtext")
.HasColumnName("Webhooks");
b.HasKey("Id");
b.ToTable("AbpWebhooksSubscriptions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b =>
{
b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent")
.WithOne()
.HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("WebhookEvent");
});
#pragma warning restore 612, 618
}
}
}