// <auto-generated />
using BlazorPolicyAuth.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace BlazorPolicyAuth.Migrations
{
    [DbContext(typeof(AppDbContext))]
    partial class AppDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder.HasAnnotation("ProductVersion", "10.0.1");

            modelBuilder.Entity("BlazorPolicyAuth.Models.Entities.UserAccount", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER")
                        .HasColumnName("id");

                    b.Property<string>("Password")
                        .HasMaxLength(100)
                        .HasColumnType("TEXT")
                        .HasColumnName("password");

                    b.Property<string>("UserName")
                        .HasMaxLength(100)
                        .HasColumnType("TEXT")
                        .HasColumnName("user_name");

                    b.HasKey("Id");

                    b.ToTable("user_account");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            Password = "user1",
                            UserName = "user1"
                        },
                        new
                        {
                            Id = 2,
                            Password = "user2",
                            UserName = "user2"
                        },
                        new
                        {
                            Id = 3,
                            Password = "user3",
                            UserName = "user3"
                        },
                        new
                        {
                            Id = 4,
                            Password = "user4",
                            UserName = "user4"
                        },
                        new
                        {
                            Id = 5,
                            Password = "user5",
                            UserName = "user5"
                        });
                });

            modelBuilder.Entity("BlazorPolicyAuth.Models.Entities.UserAccountPolicy", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER")
                        .HasColumnName("id");

                    b.Property<bool>("IsEnabled")
                        .HasColumnType("INTEGER")
                        .HasColumnName("is_enabled");

                    b.Property<int>("UserAccountId")
                        .HasColumnType("INTEGER")
                        .HasColumnName("user_account_policy");

                    b.Property<string>("UserPolicy")
                        .HasColumnType("TEXT")
                        .HasColumnName("user_policy");

                    b.HasKey("Id");

                    b.ToTable("user_account_policy");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            IsEnabled = false,
                            UserAccountId = 1,
                            UserPolicy = "VIEW_PRODUCT"
                        },
                        new
                        {
                            Id = 2,
                            IsEnabled = false,
                            UserAccountId = 1,
                            UserPolicy = "ADD_PRODUCT"
                        },
                        new
                        {
                            Id = 3,
                            IsEnabled = false,
                            UserAccountId = 1,
                            UserPolicy = "EDIT_PRODUCT"
                        },
                        new
                        {
                            Id = 4,
                            IsEnabled = false,
                            UserAccountId = 1,
                            UserPolicy = "DELETE_PRODUCT"
                        },
                        new
                        {
                            Id = 5,
                            IsEnabled = true,
                            UserAccountId = 2,
                            UserPolicy = "VIEW_PRODUCT"
                        },
                        new
                        {
                            Id = 6,
                            IsEnabled = false,
                            UserAccountId = 2,
                            UserPolicy = "ADD_PRODUCT"
                        },
                        new
                        {
                            Id = 7,
                            IsEnabled = false,
                            UserAccountId = 2,
                            UserPolicy = "EDIT_PRODUCT"
                        },
                        new
                        {
                            Id = 8,
                            IsEnabled = false,
                            UserAccountId = 2,
                            UserPolicy = "DELETE_PRODUCT"
                        },
                        new
                        {
                            Id = 9,
                            IsEnabled = true,
                            UserAccountId = 3,
                            UserPolicy = "VIEW_PRODUCT"
                        },
                        new
                        {
                            Id = 10,
                            IsEnabled = true,
                            UserAccountId = 3,
                            UserPolicy = "ADD_PRODUCT"
                        },
                        new
                        {
                            Id = 11,
                            IsEnabled = false,
                            UserAccountId = 3,
                            UserPolicy = "EDIT_PRODUCT"
                        },
                        new
                        {
                            Id = 12,
                            IsEnabled = false,
                            UserAccountId = 3,
                            UserPolicy = "DELETE_PRODUCT"
                        },
                        new
                        {
                            Id = 13,
                            IsEnabled = true,
                            UserAccountId = 4,
                            UserPolicy = "VIEW_PRODUCT"
                        },
                        new
                        {
                            Id = 14,
                            IsEnabled = true,
                            UserAccountId = 4,
                            UserPolicy = "ADD_PRODUCT"
                        },
                        new
                        {
                            Id = 15,
                            IsEnabled = true,
                            UserAccountId = 4,
                            UserPolicy = "EDIT_PRODUCT"
                        },
                        new
                        {
                            Id = 16,
                            IsEnabled = false,
                            UserAccountId = 4,
                            UserPolicy = "DELETE_PRODUCT"
                        },
                        new
                        {
                            Id = 17,
                            IsEnabled = true,
                            UserAccountId = 5,
                            UserPolicy = "VIEW_PRODUCT"
                        },
                        new
                        {
                            Id = 18,
                            IsEnabled = true,
                            UserAccountId = 5,
                            UserPolicy = "ADD_PRODUCT"
                        },
                        new
                        {
                            Id = 19,
                            IsEnabled = true,
                            UserAccountId = 5,
                            UserPolicy = "EDIT_PRODUCT"
                        },
                        new
                        {
                            Id = 20,
                            IsEnabled = true,
                            UserAccountId = 5,
                            UserPolicy = "DELETE_PRODUCT"
                        });
                });
#pragma warning restore 612, 618
        }
    }
}
