// <auto-generated />
using Elsa.Webhooks.Persistence.EntityFramework.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace Elsa.Webhooks.Persistence.EntityFramework.SqlServer.Migrations
{
    [DbContext(typeof(WebhookContext))]
    [Migration("20210604065113_Initial")]
    partial class Initial
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasDefaultSchema("Elsa")
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
                .HasAnnotation("ProductVersion", "5.0.6")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("Elsa.Webhooks.Abstractions.Models.WebhookDefinition", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Description")
                        .HasColumnType("nvarchar(450)");

                    b.Property<bool>("IsEnabled")
                        .HasColumnType("bit");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("Path")
                        .IsRequired()
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("PayloadTypeName")
                        .HasColumnType("nvarchar(450)");

                    b.Property<string>("TenantId")
                        .HasColumnType("nvarchar(450)");

                    b.HasKey("Id");

                    b.HasIndex("Description")
                        .HasDatabaseName("IX_WebhookDefinition_Description");

                    b.HasIndex("IsEnabled")
                        .HasDatabaseName("IX_WebhookDefinition_IsEnabled");

                    b.HasIndex("Name")
                        .HasDatabaseName("IX_WebhookDefinition_Name");

                    b.HasIndex("Path")
                        .HasDatabaseName("IX_WebhookDefinition_Path");

                    b.HasIndex("PayloadTypeName")
                        .HasDatabaseName("IX_WebhookDefinition_PayloadTypeName");

                    b.HasIndex("TenantId")
                        .HasDatabaseName("IX_WebhookDefinition_TenantId");

                    b.ToTable("WebhookDefinitions");
                });
#pragma warning restore 612, 618
        }
    }
}
