ISEbd-22_Baygulov_A.A._Sush.../SushiBar/SushiBarDatabaseImplement/Migrations/SushiBarDatabaseModelSnapshot.cs

253 lines
8.5 KiB
C#
Raw Normal View History

2024-03-28 23:00:05 +04:00
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
2024-05-04 15:58:35 +04:00
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
2024-03-28 23:00:05 +04:00
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
2024-05-03 19:59:17 +04:00
.HasAnnotation("ProductVersion", "8.0.4")
2024-05-04 15:58:35 +04:00
.HasAnnotation("Relational:MaxIdentifierLength", 63);
2024-03-28 23:00:05 +04:00
2024-05-04 15:58:35 +04:00
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
2024-03-28 23:00:05 +04:00
2024-05-03 19:59:17 +04:00
modelBuilder.Entity("SushiBarDatabaseImplement.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-05-03 19:59:17 +04:00
2024-05-04 15:58:35 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-05-03 19:59:17 +04:00
b.Property<string>("ClientFIO")
.IsRequired()
2024-05-04 15:58:35 +04:00
.HasColumnType("text");
2024-05-03 19:59:17 +04:00
b.Property<string>("Email")
.IsRequired()
2024-05-04 15:58:35 +04:00
.HasColumnType("text");
2024-05-03 19:59:17 +04:00
b.Property<string>("Password")
.IsRequired()
2024-05-04 15:58:35 +04:00
.HasColumnType("text");
2024-05-03 19:59:17 +04:00
b.HasKey("Id");
b.ToTable("Clients");
});
2024-05-04 18:06:03 +04:00
modelBuilder.Entity("SushiBarDatabaseImplement.Implementer", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ImplementerFIO")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Qualification")
.HasColumnType("integer");
b.Property<int>("WorkExperience")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Implementers");
});
2024-03-28 23:00:05 +04:00
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Component", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
2024-05-04 15:58:35 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-28 23:00:05 +04:00
b.Property<string>("ComponentName")
.IsRequired()
2024-05-04 15:58:35 +04:00
.HasColumnType("text");
2024-03-28 23:00:05 +04:00
b.Property<double>("Cost")
2024-05-04 15:58:35 +04:00
.HasColumnType("double precision");
2024-03-28 23:00:05 +04:00
b.HasKey("Id");
b.ToTable("Components");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Order", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
2024-05-04 15:58:35 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-28 23:00:05 +04:00
2024-05-03 22:25:04 +04:00
b.Property<int>("ClientId")
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-05-03 19:59:17 +04:00
2024-03-28 23:00:05 +04:00
b.Property<int>("Count")
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
b.Property<DateTime>("DateCreate")
2024-05-04 15:58:35 +04:00
.HasColumnType("timestamp without time zone");
2024-03-28 23:00:05 +04:00
b.Property<DateTime?>("DateImplement")
2024-05-04 15:58:35 +04:00
.HasColumnType("timestamp without time zone");
2024-03-28 23:00:05 +04:00
2024-05-04 18:06:03 +04:00
b.Property<int?>("ImplementerId")
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
b.Property<int>("Status")
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
b.Property<double>("Sum")
2024-05-04 15:58:35 +04:00
.HasColumnType("double precision");
2024-03-28 23:00:05 +04:00
b.Property<int>("SushiId")
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
b.HasKey("Id");
2024-05-03 19:59:17 +04:00
b.HasIndex("ClientId");
2024-05-04 18:06:03 +04:00
b.HasIndex("ImplementerId");
2024-03-28 23:00:05 +04:00
b.HasIndex("SushiId");
b.ToTable("Orders");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Sushi", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
2024-05-04 15:58:35 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-28 23:00:05 +04:00
b.Property<double>("Price")
2024-05-04 15:58:35 +04:00
.HasColumnType("double precision");
2024-03-28 23:00:05 +04:00
b.Property<string>("SushiName")
.IsRequired()
2024-05-04 15:58:35 +04:00
.HasColumnType("text");
2024-03-28 23:00:05 +04:00
b.HasKey("Id");
b.ToTable("Sushis");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.SushiComponent", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
2024-05-04 15:58:35 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-28 23:00:05 +04:00
b.Property<int>("ComponentId")
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
b.Property<int>("Count")
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
b.Property<int>("SushiId")
2024-05-04 15:58:35 +04:00
.HasColumnType("integer");
2024-03-28 23:00:05 +04:00
b.HasKey("Id");
b.HasIndex("ComponentId");
b.HasIndex("SushiId");
b.ToTable("SushiComponents");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Order", b =>
{
2024-05-03 22:25:04 +04:00
b.HasOne("SushiBarDatabaseImplement.Client", "Client")
2024-05-03 19:59:17 +04:00
.WithMany("Orders")
2024-05-03 22:25:04 +04:00
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2024-05-03 19:59:17 +04:00
2024-05-04 18:06:03 +04:00
b.HasOne("SushiBarDatabaseImplement.Implementer", null)
.WithMany("Order")
.HasForeignKey("ImplementerId");
2024-03-28 23:00:05 +04:00
b.HasOne("SushiBarDatabaseImplement.Models.Sushi", "Sushi")
.WithMany("Orders")
.HasForeignKey("SushiId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2024-05-03 22:25:04 +04:00
b.Navigation("Client");
2024-03-28 23:00:05 +04:00
b.Navigation("Sushi");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.SushiComponent", b =>
{
b.HasOne("SushiBarDatabaseImplement.Models.Component", "Component")
.WithMany("SushiComponents")
.HasForeignKey("ComponentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SushiBarDatabaseImplement.Models.Sushi", "Sushi")
.WithMany("Components")
.HasForeignKey("SushiId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Component");
b.Navigation("Sushi");
});
2024-05-03 19:59:17 +04:00
modelBuilder.Entity("SushiBarDatabaseImplement.Client", b =>
{
b.Navigation("Orders");
});
2024-05-04 18:06:03 +04:00
modelBuilder.Entity("SushiBarDatabaseImplement.Implementer", b =>
{
b.Navigation("Order");
});
2024-03-28 23:00:05 +04:00
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Component", b =>
{
b.Navigation("SushiComponents");
});
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Sushi", b =>
{
b.Navigation("Components");
b.Navigation("Orders");
});
#pragma warning restore 612, 618
}
}
}