SUBD_SushiBar/SushiBar/SushiBarDatabaseImplement/Migrations/SushiBarDatabaseModelSnapshot.cs

209 lines
6.9 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using SushiBarDatabaseImplement;
#nullable disable
namespace SushiBarDatabaseImplement.Migrations
{
[DbContext(typeof(SushiBarDatabase))]
partial class SushiBarDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Buyer", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime?>("BuyerBirthDate")
.HasColumnType("timestamp without time zone");
b.Property<string>("BuyerName")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Buyers");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Cook", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("CookName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("CookSurname")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Experience")
.HasColumnType("integer");
b.Property<string>("Passport")
.IsRequired()
.HasColumnType("text");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Cooks");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Menu", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<string>("FoodName")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.ToTable("Menus");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Place", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("CountPlaces")
.HasColumnType("integer");
b.Property<int>("PlaceNumber")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Places");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Task", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("BuyerId")
.HasColumnType("integer");
b.Property<int>("CookId")
.HasColumnType("integer");
b.Property<double>("FullPrice")
.HasColumnType("double precision");
b.Property<int>("PlaceId")
.HasColumnType("integer");
b.Property<int>("Status")
.HasColumnType("integer");
b.Property<DateTime>("TaskDate")
.HasColumnType("timestamp without time zone");
b.HasKey("Id");
b.ToTable("Tasks");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.TaskMenu", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Count")
.HasColumnType("integer");
b.Property<int>("MenuId")
.HasColumnType("integer");
b.Property<int>("TaskId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("MenuId");
b.HasIndex("TaskId");
b.ToTable("TaskMenus");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.TaskMenu", b =>
{
b.HasOne("SushiBarDatabaseImplement.Models.Menu", "Menu")
.WithMany("TaskMenus")
.HasForeignKey("MenuId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SushiBarDatabaseImplement.Models.Task", "Task")
.WithMany("Menus")
.HasForeignKey("TaskId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Menu");
b.Navigation("Task");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Menu", b =>
{
b.Navigation("TaskMenus");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Task", b =>
{
b.Navigation("Menus");
});
#pragma warning restore 612, 618
}
}
}