PIbd21_Makarov_DV_FlowerShop/FlowerShop/FlowerShopDatabaseImplement/Migrations/FlowerShopDatabaseModelSnapshot.cs

167 lines
5.7 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
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.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
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>("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");
b.HasIndex("FlowerId");
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 =>
{
b.HasOne("FlowerShopDatabaseImplement.Models.Flower", null)
.WithMany("Orders")
.HasForeignKey("FlowerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Component", b =>
{
b.Navigation("FlowerComponents");
});
modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Flower", b =>
{
b.Navigation("Components");
b.Navigation("Orders");
});
#pragma warning restore 612, 618
}
}
}