405 lines
14 KiB
C#
405 lines
14 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using CandidateReviewDatabaseImplement;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace CandidateReviewDatabaseImplement.Migrations
|
|
{
|
|
[DbContext(typeof(CandidateReviewDatabase))]
|
|
[Migration("20241105152221_InitialCreate")]
|
|
partial class InitialCreate
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.10")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Assessment", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Comment")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int?>("Rating")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("ResumeId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Assessments");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.AssessmentCriterion", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("AssessmentId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("CriterionId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Value")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssessmentId");
|
|
|
|
b.HasIndex("CriterionId");
|
|
|
|
b.ToTable("AssessmentCriterions");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Company", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Contacts")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("LogoFilePath")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Website")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Companies");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Criterion", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Weight")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Criterions");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Resume", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Education")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Experience")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PhotoFilePath")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("ResumeId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Skills")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("VacancyId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ResumeId")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.HasIndex("VacancyId");
|
|
|
|
b.ToTable("Resumes");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AvatarFilePath")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int?>("CompanyId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Role")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Surname")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Vacancy", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CompanyId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("JobTitle")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("JobType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Requirements")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Responsibilities")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Salary")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Tags")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
b.ToTable("Vacancies");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Assessment", b =>
|
|
{
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.User", "User")
|
|
.WithMany("Assessments")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.AssessmentCriterion", b =>
|
|
{
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.Assessment", "Assessment")
|
|
.WithMany("Criterions")
|
|
.HasForeignKey("AssessmentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.Criterion", "Criterion")
|
|
.WithMany("AssessmentCriterions")
|
|
.HasForeignKey("CriterionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Assessment");
|
|
|
|
b.Navigation("Criterion");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Resume", b =>
|
|
{
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.Assessment", "Assessment")
|
|
.WithOne("Resume")
|
|
.HasForeignKey("CandidateReviewDatabaseImplement.Models.Resume", "ResumeId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.User", "User")
|
|
.WithMany("Resumes")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.Vacancy", "Vacancy")
|
|
.WithMany("Resumes")
|
|
.HasForeignKey("VacancyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Assessment");
|
|
|
|
b.Navigation("User");
|
|
|
|
b.Navigation("Vacancy");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.User", b =>
|
|
{
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.Company", "Company")
|
|
.WithMany("Users")
|
|
.HasForeignKey("CompanyId");
|
|
|
|
b.Navigation("Company");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Vacancy", b =>
|
|
{
|
|
b.HasOne("CandidateReviewDatabaseImplement.Models.Company", "Company")
|
|
.WithMany("Vacancies")
|
|
.HasForeignKey("CompanyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Company");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Assessment", b =>
|
|
{
|
|
b.Navigation("Criterions");
|
|
|
|
b.Navigation("Resume")
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Company", b =>
|
|
{
|
|
b.Navigation("Users");
|
|
|
|
b.Navigation("Vacancies");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Criterion", b =>
|
|
{
|
|
b.Navigation("AssessmentCriterions");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.User", b =>
|
|
{
|
|
b.Navigation("Assessments");
|
|
|
|
b.Navigation("Resumes");
|
|
});
|
|
|
|
modelBuilder.Entity("CandidateReviewDatabaseImplement.Models.Vacancy", b =>
|
|
{
|
|
b.Navigation("Resumes");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|