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

namespace Elsa.Webhooks.Persistence.EntityFramework.PostgreSql.Migrations
{
    [DbContext(typeof(WebhookContext))]
    [Migration("20210604065057_Initial")]
    partial class Initial
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasDefaultSchema("Elsa")
                .HasAnnotation("Relational:MaxIdentifierLength", 63)
                .HasAnnotation("ProductVersion", "5.0.6")
                .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);

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

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

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

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

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

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

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

                    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
        }
    }
}
