329 lines
11 KiB
C#
329 lines
11 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
using SchoolDatabaseImplement;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace SchoolDatabaseImplements.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(SchoolDatabase))]
|
|||
|
partial class SchoolDatabaseModelSnapshot : ModelSnapshot
|
|||
|
{
|
|||
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "7.0.4")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|||
|
|
|||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Circle", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("ClientId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<DateTime>("DateStart")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ClientId");
|
|||
|
|
|||
|
b.ToTable("Circles");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.CircleExpense", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("CircleId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("ExpenseId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("CircleId");
|
|||
|
|
|||
|
b.HasIndex("ExpenseId");
|
|||
|
|
|||
|
b.ToTable("CircleExpenses");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.CircleLesson", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("CircleId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("Count")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("LessonId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("CircleId");
|
|||
|
|
|||
|
b.HasIndex("LessonId");
|
|||
|
|
|||
|
b.ToTable("CircleLessons");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Client", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("ClientEmail")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("ClientName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("ClientPassword")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("ClientPhone")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Clients");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Employee", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("EmployeeEmail")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("EmployeeName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("EmployeePassword")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("EmployeePhone")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Employees");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Expense", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("ExpenseName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<double>("Sum")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Expenses");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Lesson", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("EmployeeId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<string>("LessonName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<double>("LessonPrice")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("EmployeeId");
|
|||
|
|
|||
|
b.ToTable("Lessons");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Payment", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<DateTime?>("DateOfPayment")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("LessonId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<double>("Remains")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.Property<double>("Sum")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("LessonId");
|
|||
|
|
|||
|
b.ToTable("Payments");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Circle", b =>
|
|||
|
{
|
|||
|
b.HasOne("SchoolDatabaseImplement.Models.Client", "Client")
|
|||
|
.WithMany("Circles")
|
|||
|
.HasForeignKey("ClientId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Client");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.CircleExpense", b =>
|
|||
|
{
|
|||
|
b.HasOne("SchoolDatabaseImplement.Models.Circle", "Circle")
|
|||
|
.WithMany("CircleExpenses")
|
|||
|
.HasForeignKey("CircleId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("SchoolDatabaseImplement.Models.Expense", "Expense")
|
|||
|
.WithMany("CircleExpenses")
|
|||
|
.HasForeignKey("ExpenseId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Circle");
|
|||
|
|
|||
|
b.Navigation("Expense");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.CircleLesson", b =>
|
|||
|
{
|
|||
|
b.HasOne("SchoolDatabaseImplement.Models.Circle", "Circle")
|
|||
|
.WithMany("CircleLessons")
|
|||
|
.HasForeignKey("CircleId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("SchoolDatabaseImplement.Models.Lesson", "Lesson")
|
|||
|
.WithMany("CircleLessons")
|
|||
|
.HasForeignKey("LessonId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Circle");
|
|||
|
|
|||
|
b.Navigation("Lesson");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Lesson", b =>
|
|||
|
{
|
|||
|
b.HasOne("SchoolDatabaseImplement.Models.Employee", "Employee")
|
|||
|
.WithMany("Lessons")
|
|||
|
.HasForeignKey("EmployeeId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Employee");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Payment", b =>
|
|||
|
{
|
|||
|
b.HasOne("SchoolDatabaseImplement.Models.Lesson", "Lesson")
|
|||
|
.WithMany("Payments")
|
|||
|
.HasForeignKey("LessonId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Lesson");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Circle", b =>
|
|||
|
{
|
|||
|
b.Navigation("CircleExpenses");
|
|||
|
|
|||
|
b.Navigation("CircleLessons");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Client", b =>
|
|||
|
{
|
|||
|
b.Navigation("Circles");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Employee", b =>
|
|||
|
{
|
|||
|
b.Navigation("Lessons");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Expense", b =>
|
|||
|
{
|
|||
|
b.Navigation("CircleExpenses");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("SchoolDatabaseImplement.Models.Lesson", b =>
|
|||
|
{
|
|||
|
b.Navigation("CircleLessons");
|
|||
|
|
|||
|
b.Navigation("Payments");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|