SUBD_SushiBar/SushiBar/SushiBarDatabaseImplement/Migrations/20240326181255_InitialCreate.Designer.cs

212 lines
6.9 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SushiBarDatabaseImplement;
#nullable disable
namespace SushiBarDatabaseImplement.Migrations
{
[DbContext(typeof(SushiBarDatabase))]
[Migration("20240326181255_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Buyer", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime?>("BuyerBirthDate")
.HasColumnType("datetime2");
b.Property<string>("BuyerName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Buyers");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Cook", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("CookName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("CookSurname")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("Experience")
.HasColumnType("int");
b.Property<string>("Passport")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Cooks");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Menu", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("FoodName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<double>("Price")
.HasColumnType("float");
b.HasKey("Id");
b.ToTable("Menus");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Place", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CountPlaces")
.HasColumnType("int");
b.Property<int>("PlaceNumber")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("Places");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Task", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("BuyerId")
.HasColumnType("int");
b.Property<int>("CookId")
.HasColumnType("int");
b.Property<double>("FullPrice")
.HasColumnType("float");
b.Property<int>("PlaceId")
.HasColumnType("int");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<DateTime>("TaskDate")
.HasColumnType("datetime2");
b.HasKey("Id");
b.ToTable("Tasks");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.TaskMenu", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("Count")
.HasColumnType("int");
b.Property<int>("MenuId")
.HasColumnType("int");
b.Property<int>("TaskId")
.HasColumnType("int");
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
}
}
}