PIbd21_Makarov_DV_FlowerShop/FlowerShop/FlowerShopDatabaseImplement/Migrations/FlowerShopDatabaseModelSnapshot.cs

250 lines
8.5 KiB
C#
Raw Normal View History

2024-03-09 17:32:17 +04:00
// <auto-generated />
using System;
using FlowerShopDatabaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
2024-04-04 00:39:31 +04:00
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
2024-03-09 17:32:17 +04:00
#nullable disable
namespace FlowerShopDatabaseImplement.Migrations
{
[DbContext(typeof(FlowerShopDatabase))]
partial class FlowerShopDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.27")
2024-04-04 00:39:31 +04:00
.HasAnnotation("Relational:MaxIdentifierLength", 63);
2024-03-09 17:32:17 +04:00
2024-04-04 00:39:31 +04:00
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
2024-03-09 17:32:17 +04:00
2024-04-04 18:22:29 +04:00
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ClientFIO")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Clients");
});
2024-03-09 17:32:17 +04:00
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Component", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
2024-04-04 00:39:31 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-09 17:32:17 +04:00
b.Property<string>("ComponentName")
.IsRequired()
2024-04-04 00:39:31 +04:00
.HasColumnType("text");
2024-03-09 17:32:17 +04:00
b.Property<double>("Cost")
2024-04-04 00:39:31 +04:00
.HasColumnType("double precision");
2024-03-09 17:32:17 +04:00
b.HasKey("Id");
b.ToTable("Components");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Flower", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
2024-04-04 00:39:31 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-09 17:32:17 +04:00
b.Property<string>("FlowerName")
.IsRequired()
2024-04-04 00:39:31 +04:00
.HasColumnType("text");
2024-03-09 17:32:17 +04:00
b.Property<double>("Price")
2024-04-04 00:39:31 +04:00
.HasColumnType("double precision");
2024-03-09 17:32:17 +04:00
b.HasKey("Id");
b.ToTable("Flowers");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.FlowerComponent", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
2024-04-04 00:39:31 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-09 17:32:17 +04:00
b.Property<int>("ComponentId")
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.Property<int>("Count")
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.Property<int>("FlowerId")
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.HasKey("Id");
b.HasIndex("ComponentId");
b.HasIndex("FlowerId");
b.ToTable("FlowerComponents");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.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-09 17:32:17 +04:00
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Order", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
2024-04-04 00:39:31 +04:00
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
2024-03-09 17:32:17 +04:00
2024-04-04 18:22:29 +04:00
b.Property<int>("ClientId")
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.Property<int>("Count")
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.Property<DateTime>("DateCreate")
2024-04-04 00:39:31 +04:00
.HasColumnType("timestamp without time zone");
2024-03-09 17:32:17 +04:00
b.Property<DateTime?>("DateImplement")
2024-04-04 00:39:31 +04:00
.HasColumnType("timestamp without time zone");
2024-03-09 17:32:17 +04:00
b.Property<int>("FlowerId")
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.Property<int?>("ImplementerId")
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.Property<int>("Status")
2024-04-04 00:39:31 +04:00
.HasColumnType("integer");
2024-03-09 17:32:17 +04:00
b.Property<double>("Sum")
2024-04-04 00:39:31 +04:00
.HasColumnType("double precision");
2024-03-09 17:32:17 +04:00
b.HasKey("Id");
2024-04-22 20:38:34 +04:00
b.HasIndex("ClientId");
2024-03-09 17:32:17 +04:00
b.HasIndex("FlowerId");
b.HasIndex("ImplementerId");
2024-03-09 17:32:17 +04:00
b.ToTable("Orders");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.FlowerComponent", b =>
{
b.HasOne("FlowerShopDatabaseImplement.Models.Component", "Component")
.WithMany("FlowerComponents")
.HasForeignKey("ComponentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("FlowerShopDatabaseImplement.Models.Flower", "Flower")
.WithMany("Components")
.HasForeignKey("FlowerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Component");
b.Navigation("Flower");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Order", b =>
{
2024-04-22 20:38:34 +04:00
b.HasOne("FlowerShopDatabaseImplement.Models.Client", "Client")
.WithMany()
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("FlowerShopDatabaseImplement.Models.Flower", "Flower")
2024-03-09 17:32:17 +04:00
.WithMany("Orders")
.HasForeignKey("FlowerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2024-04-22 20:38:34 +04:00
b.HasOne("FlowerShopDatabaseImplement.Models.Implementer", "Implementer")
.WithMany("Order")
.HasForeignKey("ImplementerId");
2024-04-22 20:38:34 +04:00
b.Navigation("Client");
b.Navigation("Flower");
b.Navigation("Implementer");
2024-03-09 17:32:17 +04:00
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Component", b =>
{
b.Navigation("FlowerComponents");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Flower", b =>
{
b.Navigation("Components");
b.Navigation("Orders");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Implementer", b =>
{
b.Navigation("Order");
});
2024-03-09 17:32:17 +04:00
#pragma warning restore 612, 618
}
}
}