ISEbd-22_CourseWork_School/School/SchoolDataBaseImplement/Migrations/20230515153721_Init.Designer.cs

373 lines
13 KiB
C#
Raw Permalink Normal View History

2024-05-01 17:54:58 +04:00
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using UniversityDatabaseImplement;
#nullable disable
namespace UniversityDatabaseImplement.Migrations
{
[DbContext(typeof(UniversityDB))]
[Migration("20230515153721_Init")]
partial class Init
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("UniversityDatabaseImplement.Models.Account", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientByDisciplineId")
.HasColumnType("integer");
b.Property<DateOnly>("DateOfAccount")
.HasColumnType("date");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("ClientByDisciplineId");
b.ToTable("Accounts");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Course")
.HasColumnType("integer");
b.Property<int>("DirectorId")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("DirectorId");
b.ToTable("Clients");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.ClientByDiscipline", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<DateTime>("DateOfClient")
.HasColumnType("timestamp with time zone");
b.Property<int>("DisciplineId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasIndex("DisciplineId");
b.ToTable("ClientsByDisciplines");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Director", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Login")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Directors");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Discipline", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateOnly>("DateOfPassage")
.HasColumnType("date");
b.Property<DateOnly>("DateOfReceipt")
.HasColumnType("date");
b.Property<int>("ImplementerId")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("ImplementerId");
b.ToTable("Disciplines");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Implementer", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Login")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Implementers");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Requirement", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("DirectorId")
.HasColumnType("integer");
b.Property<string>("NameOfRequirement")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("DirectorId");
b.ToTable("Requirements");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.RequirementByDiscipline", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Count")
.HasColumnType("integer");
b.Property<int>("DisciplineId")
.HasColumnType("integer");
b.Property<int>("RequirementId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("DisciplineId");
b.HasIndex("RequirementId");
b.ToTable("RequirementByDisciplines");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Account", b =>
{
b.HasOne("UniversityDatabaseImplement.Models.ClientByDiscipline", "ClientByDiscipline")
.WithMany("Accounts")
.HasForeignKey("ClientByDisciplineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ClientByDiscipline");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Client", b =>
{
b.HasOne("UniversityDatabaseImplement.Models.Director", "Director")
.WithMany("Clients")
.HasForeignKey("DirectorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Director");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.ClientByDiscipline", b =>
{
b.HasOne("UniversityDatabaseImplement.Models.Client", "Client")
.WithMany("Disciplines")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("UniversityDatabaseImplement.Models.Discipline", "Discipline")
.WithMany("Clients")
.HasForeignKey("DisciplineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
b.Navigation("Discipline");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Discipline", b =>
{
b.HasOne("UniversityDatabaseImplement.Models.Implementer", "Client")
.WithMany("Disciplines")
.HasForeignKey("ImplementerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Requirement", b =>
{
b.HasOne("UniversityDatabaseImplement.Models.Director", "Director")
.WithMany("Requirements")
.HasForeignKey("DirectorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Director");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.RequirementByDiscipline", b =>
{
b.HasOne("UniversityDatabaseImplement.Models.Discipline", "Discipline")
.WithMany("Requirements")
.HasForeignKey("DisciplineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("UniversityDatabaseImplement.Models.Requirement", "Requirement")
.WithMany("Disciplines")
.HasForeignKey("RequirementId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Discipline");
b.Navigation("Requirement");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Client", b =>
{
b.Navigation("Disciplines");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.ClientByDiscipline", b =>
{
b.Navigation("Accounts");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Director", b =>
{
b.Navigation("Clients");
b.Navigation("Requirements");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Discipline", b =>
{
b.Navigation("Clients");
b.Navigation("Requirements");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Implementer", b =>
{
b.Navigation("Disciplines");
});
modelBuilder.Entity("UniversityDatabaseImplement.Models.Requirement", b =>
{
b.Navigation("Disciplines");
});
#pragma warning restore 612, 618
}
}
}