// <auto-generated />
using System;
using Infrastructure.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace Domain.Migrations
{
    [DbContext(typeof(DatabaseContext))]
    [Migration("20240229144942_SalaryGenderAndYearsOfExperienceProps")]
    partial class SalaryGenderAndYearsOfExperienceProps
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "8.0.0")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("Domain.Entities.Interviews.Interview", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<long?>("CandidateGrade")
                        .HasColumnType("bigint");

                    b.Property<string>("CandidateName")
                        .IsRequired()
                        .HasMaxLength(150)
                        .HasColumnType("character varying(150)");

                    b.Property<DateTimeOffset>("CreatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<long>("InterviewerId")
                        .HasColumnType("bigint");

                    b.Property<string>("OverallOpinion")
                        .HasMaxLength(20000)
                        .HasColumnType("character varying(20000)");

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

                    b.Property<DateTimeOffset>("UpdatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.HasKey("Id");

                    b.HasIndex("InterviewerId");

                    b.ToTable("Interviews", (string)null);
                });

            modelBuilder.Entity("Domain.Entities.Interviews.InterviewTemplate", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<long>("AuthorId")
                        .HasColumnType("bigint");

                    b.Property<DateTimeOffset>("CreatedAt")
                        .HasColumnType("timestamp with time zone");

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

                    b.Property<string>("OverallOpinion")
                        .HasMaxLength(20000)
                        .HasColumnType("character varying(20000)");

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

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(150)
                        .HasColumnType("character varying(150)");

                    b.Property<DateTimeOffset>("UpdatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.HasKey("Id");

                    b.HasIndex("AuthorId");

                    b.ToTable("InterviewTemplates", (string)null);
                });

            modelBuilder.Entity("Domain.Entities.Labels.UserLabel", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));

                    b.Property<long?>("CreatedById")
                        .HasColumnType("bigint");

                    b.Property<string>("HexColor")
                        .IsRequired()
                        .HasMaxLength(7)
                        .HasColumnType("character varying(7)");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.HasKey("Id");

                    b.HasIndex("CreatedById");

                    b.ToTable("UserLabels", (string)null);
                });

            modelBuilder.Entity("Domain.Entities.Salaries.Profession", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));

                    b.Property<long?>("CreatedById")
                        .HasColumnType("bigint");

                    b.Property<string>("HexColor")
                        .IsRequired()
                        .HasMaxLength(7)
                        .HasColumnType("character varying(7)");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.HasKey("Id");

                    b.HasIndex("CreatedById");

                    b.ToTable("Professions", (string)null);

                    b.HasData(
                        new
                        {
                            Id = 1L,
                            HexColor = "#056B17",
                            Title = "Developer"
                        },
                        new
                        {
                            Id = 2L,
                            HexColor = "#BD360F",
                            Title = "QualityAssurance"
                        },
                        new
                        {
                            Id = 3L,
                            HexColor = "#6B2899",
                            Title = "Tester"
                        },
                        new
                        {
                            Id = 4L,
                            HexColor = "#0EB156",
                            Title = "BusinessAnalyst"
                        },
                        new
                        {
                            Id = 5L,
                            HexColor = "#8D7EF8",
                            Title = "ProjectManager"
                        },
                        new
                        {
                            Id = 6L,
                            HexColor = "#947FF5",
                            Title = "ScrumMaster"
                        },
                        new
                        {
                            Id = 7L,
                            HexColor = "#3CA116",
                            Title = "DevOps"
                        },
                        new
                        {
                            Id = 8L,
                            HexColor = "#A87BA5",
                            Title = "SystemAdministrator"
                        },
                        new
                        {
                            Id = 9L,
                            HexColor = "#F69550",
                            Title = "ProductOwner"
                        },
                        new
                        {
                            Id = 10L,
                            HexColor = "#5186D1",
                            Title = "TeamLeader"
                        },
                        new
                        {
                            Id = 11L,
                            HexColor = "#BCD79B",
                            Title = "Architect"
                        },
                        new
                        {
                            Id = 12L,
                            HexColor = "#6D40A1",
                            Title = "DataScientist"
                        },
                        new
                        {
                            Id = 13L,
                            HexColor = "#0A5170",
                            Title = "DataAnalyst"
                        },
                        new
                        {
                            Id = 14L,
                            HexColor = "#75E208",
                            Title = "DataEngineer"
                        },
                        new
                        {
                            Id = 15L,
                            HexColor = "#C643FD",
                            Title = "DataWarehouseSpecialist"
                        },
                        new
                        {
                            Id = 16L,
                            HexColor = "#97A3FE",
                            Title = "DatabaseAdministrator"
                        },
                        new
                        {
                            Id = 17L,
                            HexColor = "#00871D",
                            Title = "TechLeader"
                        },
                        new
                        {
                            Id = 18L,
                            HexColor = "#A9AC6A",
                            Title = "SystemAnalyst"
                        },
                        new
                        {
                            Id = 19L,
                            HexColor = "#95FB1D",
                            Title = "ItHr"
                        },
                        new
                        {
                            Id = 20L,
                            HexColor = "#4CB58B",
                            Title = "ItRecruiter"
                        },
                        new
                        {
                            Id = 21L,
                            HexColor = "#B70C1D",
                            Title = "UiDesigner"
                        },
                        new
                        {
                            Id = 22L,
                            HexColor = "#E6C4B0",
                            Title = "UxDesigner"
                        },
                        new
                        {
                            Id = 23L,
                            HexColor = "#4B9D9B",
                            Title = "UiUxDesigner"
                        },
                        new
                        {
                            Id = 24L,
                            HexColor = "#A8D69A",
                            Title = "ProductAnalyst"
                        },
                        new
                        {
                            Id = 25L,
                            HexColor = "#97A274",
                            Title = "ProductManager"
                        },
                        new
                        {
                            Id = 26L,
                            HexColor = "#B05BF5",
                            Title = "ProductDesigner"
                        },
                        new
                        {
                            Id = 27L,
                            HexColor = "#33502C",
                            Title = "HrNonIt"
                        },
                        new
                        {
                            Id = 28L,
                            HexColor = "#FB799B",
                            Title = "OneCDeveloper"
                        },
                        new
                        {
                            Id = 29L,
                            HexColor = "#3C0007",
                            Title = "ThreeDModeler"
                        },
                        new
                        {
                            Id = 30L,
                            HexColor = "#56F542",
                            Title = "AndroidDeveloper"
                        },
                        new
                        {
                            Id = 31L,
                            HexColor = "#02E161",
                            Title = "IosDeveloper"
                        },
                        new
                        {
                            Id = 32L,
                            HexColor = "#4278C0",
                            Title = "MobileDeveloper"
                        },
                        new
                        {
                            Id = 33L,
                            HexColor = "#962051",
                            Title = "FrontendDeveloper"
                        },
                        new
                        {
                            Id = 34L,
                            HexColor = "#C9C009",
                            Title = "BackendDeveloper"
                        },
                        new
                        {
                            Id = 35L,
                            HexColor = "#9A668E",
                            Title = "FullstackDeveloper"
                        },
                        new
                        {
                            Id = 36L,
                            HexColor = "#1D7D42",
                            Title = "GameDeveloper"
                        },
                        new
                        {
                            Id = 37L,
                            HexColor = "#D3CAEC",
                            Title = "EmbeddedDeveloper"
                        },
                        new
                        {
                            Id = 38L,
                            HexColor = "#BEC33E",
                            Title = "MachineLearningDeveloper"
                        },
                        new
                        {
                            Id = 39L,
                            HexColor = "#6E2091",
                            Title = "Pentester"
                        },
                        new
                        {
                            Id = 40L,
                            HexColor = "#3B0E72",
                            Title = "SecurityEngineer"
                        },
                        new
                        {
                            Id = 41L,
                            HexColor = "#9D0251",
                            Title = "SecurityAnalyst"
                        },
                        new
                        {
                            Id = 42L,
                            HexColor = "#6E5EA1",
                            Title = "TechnicalWriter"
                        },
                        new
                        {
                            Id = 43L,
                            HexColor = "#C71F6B",
                            Title = "BiDeveloper"
                        },
                        new
                        {
                            Id = 44L,
                            HexColor = "#2CB08E",
                            Title = "ChiefTechnicalOfficer"
                        },
                        new
                        {
                            Id = 45L,
                            HexColor = "#CA22CC",
                            Title = "ChiefExecutiveOfficer"
                        },
                        new
                        {
                            Id = 46L,
                            HexColor = "#31E330",
                            Title = "HeadOfDepartment"
                        },
                        new
                        {
                            Id = 47L,
                            HexColor = "#AF5430",
                            Title = "DeliveryManager"
                        },
                        new
                        {
                            Id = 48L,
                            HexColor = "#2B3415",
                            Title = "Copywriter"
                        },
                        new
                        {
                            Id = 49L,
                            HexColor = "#2877BF",
                            Title = "GameDesigner"
                        },
                        new
                        {
                            Id = 50L,
                            HexColor = "#E1F098",
                            Title = "SecOps"
                        },
                        new
                        {
                            Id = 51L,
                            HexColor = "#4D090C",
                            Title = "TalentAcquisition"
                        },
                        new
                        {
                            Id = 52L,
                            HexColor = "#A7BCA3",
                            Title = "CustomerSupport"
                        },
                        new
                        {
                            Id = 53L,
                            HexColor = "#439015",
                            Title = "TechnicalSupport"
                        });
                });

            modelBuilder.Entity("Domain.Entities.Salaries.Skill", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));

                    b.Property<long?>("CreatedById")
                        .HasColumnType("bigint");

                    b.Property<string>("HexColor")
                        .IsRequired()
                        .HasMaxLength(7)
                        .HasColumnType("character varying(7)");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.HasKey("Id");

                    b.HasIndex("CreatedById");

                    b.ToTable("Skills", (string)null);
                });

            modelBuilder.Entity("Domain.Entities.Salaries.UserSalary", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<long?>("City")
                        .HasColumnType("bigint");

                    b.Property<int>("Company")
                        .HasColumnType("integer");

                    b.Property<DateTimeOffset>("CreatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("Currency")
                        .HasColumnType("integer");

                    b.Property<int?>("Gender")
                        .HasColumnType("integer");

                    b.Property<long?>("Grade")
                        .HasColumnType("bigint");

                    b.Property<int>("ProfessionEnum")
                        .HasColumnType("integer");

                    b.Property<long?>("ProfessionId")
                        .HasColumnType("bigint");

                    b.Property<int>("Quarter")
                        .HasColumnType("integer");

                    b.Property<long?>("SkillId")
                        .HasColumnType("bigint");

                    b.Property<DateTimeOffset>("UpdatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("UseInStats")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("boolean")
                        .HasDefaultValue(true);

                    b.Property<long?>("UserId")
                        .HasColumnType("bigint");

                    b.Property<double>("Value")
                        .HasColumnType("double precision");

                    b.Property<long?>("WorkIndustryId")
                        .HasColumnType("bigint");

                    b.Property<int>("Year")
                        .HasColumnType("integer");

                    b.Property<int?>("YearOfStartingWork")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("ProfessionId");

                    b.HasIndex("SkillId");

                    b.HasIndex("UserId");

                    b.HasIndex("WorkIndustryId");

                    b.ToTable("UserSalaries", (string)null);
                });

            modelBuilder.Entity("Domain.Entities.Salaries.WorkIndustry", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));

                    b.Property<long?>("CreatedById")
                        .HasColumnType("bigint");

                    b.Property<string>("HexColor")
                        .IsRequired()
                        .HasMaxLength(7)
                        .HasColumnType("character varying(7)");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");

                    b.HasKey("Id");

                    b.HasIndex("CreatedById");

                    b.ToTable("WorkIndustries", (string)null);
                });

            modelBuilder.Entity("Domain.Entities.Users.User", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bigint");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));

                    b.Property<DateTimeOffset>("CreatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTimeOffset?>("DeletedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Email")
                        .IsRequired()
                        .HasMaxLength(150)
                        .HasColumnType("character varying(150)");

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

                    b.Property<string>("FirstName")
                        .IsRequired()
                        .HasMaxLength(150)
                        .HasColumnType("character varying(150)");

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

                    b.Property<DateTimeOffset?>("LastLoginAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("LastName")
                        .IsRequired()
                        .HasMaxLength(150)
                        .HasColumnType("character varying(150)");

                    b.Property<DateTimeOffset>("UpdatedAt")
                        .HasColumnType("timestamp with time zone");

                    b.HasKey("Id");

                    b.HasIndex("Email")
                        .IsUnique();

                    b.HasIndex("IdentityId")
                        .IsUnique();

                    b.ToTable("Users");
                });

            modelBuilder.Entity("Domain.Entities.Users.UserRole", b =>
                {
                    b.Property<long>("RoleId")
                        .HasColumnType("bigint");

                    b.Property<long>("UserId")
                        .HasColumnType("bigint");

                    b.HasKey("RoleId", "UserId");

                    b.HasIndex("UserId");

                    b.ToTable("UserRole");
                });

            modelBuilder.Entity("InterviewTemplateUserLabel", b =>
                {
                    b.Property<Guid>("InterviewTemplatesId")
                        .HasColumnType("uuid");

                    b.Property<long>("LabelsId")
                        .HasColumnType("bigint");

                    b.HasKey("InterviewTemplatesId", "LabelsId");

                    b.HasIndex("LabelsId");

                    b.ToTable("InterviewTemplateUserLabel");
                });

            modelBuilder.Entity("InterviewUserLabel", b =>
                {
                    b.Property<Guid>("InterviewsId")
                        .HasColumnType("uuid");

                    b.Property<long>("LabelsId")
                        .HasColumnType("bigint");

                    b.HasKey("InterviewsId", "LabelsId");

                    b.HasIndex("LabelsId");

                    b.ToTable("InterviewUserLabel");
                });

            modelBuilder.Entity("Domain.Entities.Interviews.Interview", b =>
                {
                    b.HasOne("Domain.Entities.Users.User", "Interviewer")
                        .WithMany()
                        .HasForeignKey("InterviewerId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Interviewer");
                });

            modelBuilder.Entity("Domain.Entities.Interviews.InterviewTemplate", b =>
                {
                    b.HasOne("Domain.Entities.Users.User", "Author")
                        .WithMany()
                        .HasForeignKey("AuthorId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Author");
                });

            modelBuilder.Entity("Domain.Entities.Labels.UserLabel", b =>
                {
                    b.HasOne("Domain.Entities.Users.User", "CreatedBy")
                        .WithMany()
                        .HasForeignKey("CreatedById");

                    b.Navigation("CreatedBy");
                });

            modelBuilder.Entity("Domain.Entities.Salaries.Profession", b =>
                {
                    b.HasOne("Domain.Entities.Users.User", "CreatedBy")
                        .WithMany()
                        .HasForeignKey("CreatedById");

                    b.Navigation("CreatedBy");
                });

            modelBuilder.Entity("Domain.Entities.Salaries.Skill", b =>
                {
                    b.HasOne("Domain.Entities.Users.User", "CreatedBy")
                        .WithMany()
                        .HasForeignKey("CreatedById");

                    b.Navigation("CreatedBy");
                });

            modelBuilder.Entity("Domain.Entities.Salaries.UserSalary", b =>
                {
                    b.HasOne("Domain.Entities.Salaries.Profession", "Profession")
                        .WithMany("Salaries")
                        .HasForeignKey("ProfessionId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Domain.Entities.Salaries.Skill", "Skill")
                        .WithMany("Salaries")
                        .HasForeignKey("SkillId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Domain.Entities.Users.User", "User")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.HasOne("Domain.Entities.Salaries.WorkIndustry", "WorkIndustry")
                        .WithMany("Salaries")
                        .HasForeignKey("WorkIndustryId")
                        .OnDelete(DeleteBehavior.SetNull);

                    b.Navigation("Profession");

                    b.Navigation("Skill");

                    b.Navigation("User");

                    b.Navigation("WorkIndustry");
                });

            modelBuilder.Entity("Domain.Entities.Salaries.WorkIndustry", b =>
                {
                    b.HasOne("Domain.Entities.Users.User", "CreatedBy")
                        .WithMany()
                        .HasForeignKey("CreatedById");

                    b.Navigation("CreatedBy");
                });

            modelBuilder.Entity("Domain.Entities.Users.UserRole", b =>
                {
                    b.HasOne("Domain.Entities.Users.User", "User")
                        .WithMany("UserRoles")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("InterviewTemplateUserLabel", b =>
                {
                    b.HasOne("Domain.Entities.Interviews.InterviewTemplate", null)
                        .WithMany()
                        .HasForeignKey("InterviewTemplatesId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Domain.Entities.Labels.UserLabel", null)
                        .WithMany()
                        .HasForeignKey("LabelsId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("InterviewUserLabel", b =>
                {
                    b.HasOne("Domain.Entities.Interviews.Interview", null)
                        .WithMany()
                        .HasForeignKey("InterviewsId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Domain.Entities.Labels.UserLabel", null)
                        .WithMany()
                        .HasForeignKey("LabelsId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Domain.Entities.Salaries.Profession", b =>
                {
                    b.Navigation("Salaries");
                });

            modelBuilder.Entity("Domain.Entities.Salaries.Skill", b =>
                {
                    b.Navigation("Salaries");
                });

            modelBuilder.Entity("Domain.Entities.Salaries.WorkIndustry", b =>
                {
                    b.Navigation("Salaries");
                });

            modelBuilder.Entity("Domain.Entities.Users.User", b =>
                {
                    b.Navigation("UserRoles");
                });
#pragma warning restore 612, 618
        }
    }
}
