2024-06-04 22:52:01 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using DatabaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace DatabaseImplement.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(Database))]
|
|
|
|
|
partial class DatabaseModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("ProductVersion", "8.0.6")
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
|
|
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.CartItem", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
|
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.Property<bool>("IsClosed")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<Guid>("ProductId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ProductName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid?>("PurchaseId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("UserId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("PurchaseId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("CartItems", (string)null);
|
2024-07-26 02:46:29 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.MediaFile", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2024-06-25 20:26:34 +04:00
|
|
|
|
b.Property<byte[]>("Image")
|
2024-06-22 21:16:08 +04:00
|
|
|
|
.IsRequired()
|
2024-06-25 20:26:34 +04:00
|
|
|
|
.HasColumnType("bytea");
|
2024-06-22 21:16:08 +04:00
|
|
|
|
|
|
|
|
|
b.Property<Guid>("ProductId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-06-25 13:14:23 +04:00
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("MediaFiles", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Product", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Amount")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<string>("Category")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
b.Property<bool>("IsBeingSold")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Price")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Rate")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<Guid?>("SaleId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.HasIndex("SaleId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Products", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Purchase", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2024-06-26 08:04:07 +04:00
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<DateTime?>("DateClosed")
|
|
|
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreated")
|
2024-06-26 08:04:07 +04:00
|
|
|
|
.HasColumnType("timestamp without time zone");
|
2024-06-22 21:16:08 +04:00
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<bool>("IsPaid")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ProductCount")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2024-06-23 17:04:11 +04:00
|
|
|
|
b.Property<Guid>("UserId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-06-23 17:04:11 +04:00
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Purchases", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Role", b =>
|
2024-06-23 17:04:11 +04:00
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
2024-06-23 17:04:11 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Roles", (string)null);
|
2024-06-23 17:04:11 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Sale", b =>
|
2024-06-04 22:52:01 +04:00
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<string>("Category")
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("End")
|
|
|
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("FullDescription")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
2024-06-04 22:52:01 +04:00
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<DateTime>("Start")
|
|
|
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Value")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2024-06-04 22:52:01 +04:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Sales", (string)null);
|
2024-06-04 22:52:01 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Sell", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateSell")
|
2024-06-26 08:04:07 +04:00
|
|
|
|
.HasColumnType("timestamp without time zone");
|
2024-06-22 21:16:08 +04:00
|
|
|
|
|
2024-06-24 15:06:42 +04:00
|
|
|
|
b.Property<Guid?>("UserId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Sells", (string)null);
|
2024-06-24 15:06:42 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.SellProducts", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("ProductId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("SellId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-06-24 15:06:42 +04:00
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("SellId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("SellProducts", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Supplier", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Deals")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Suppliers", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.SupplierProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("ProductId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("SupplierId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("SupplierId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("SupplierProducts", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Supply", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("Date")
|
2024-06-26 08:04:07 +04:00
|
|
|
|
.HasColumnType("timestamp without time zone");
|
2024-06-22 21:16:08 +04:00
|
|
|
|
|
2024-06-25 13:14:23 +04:00
|
|
|
|
b.Property<DateTime?>("DateArriving")
|
2024-06-26 08:04:07 +04:00
|
|
|
|
.HasColumnType("timestamp without time zone");
|
2024-06-25 13:14:23 +04:00
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateComplete")
|
2024-06-26 08:04:07 +04:00
|
|
|
|
.HasColumnType("timestamp without time zone");
|
2024-06-25 13:14:23 +04:00
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Price")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("SupplierId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("SupplierId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Supplies", (string)null);
|
2024-06-24 15:06:42 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.SupplyDoc", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("SupplyId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("SupplyDocs", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.SupplyProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("ProductId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid>("SupplyId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("SupplyId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("SupplyProducts", (string)null);
|
2024-06-22 21:16:08 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-06-04 22:52:01 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.User", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<Guid>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("Birthday")
|
2024-06-26 08:04:07 +04:00
|
|
|
|
.HasColumnType("timestamp without time zone");
|
2024-06-04 22:52:01 +04:00
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Property<int>("Bonus")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2024-06-04 22:52:01 +04:00
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("FirstName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
b.Property<bool>("OnlyImportantMails")
|
|
|
|
|
.HasColumnType("boolean");
|
|
|
|
|
|
2024-06-04 22:52:01 +04:00
|
|
|
|
b.Property<string>("PasswordHash")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<Guid?>("RoleId")
|
|
|
|
|
.HasColumnType("uuid");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("SecondName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
|
|
2024-11-24 19:51:40 +04:00
|
|
|
|
b.ToTable("Users", (string)null);
|
2024-06-04 22:52:01 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.CartItem", b =>
|
2024-06-25 13:14:23 +04:00
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Product", "Product")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ProductId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.HasOne("DatabaseImplement.Models.Purchase", "Purchase")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("PurchaseId");
|
|
|
|
|
|
2024-06-25 13:14:23 +04:00
|
|
|
|
b.Navigation("Product");
|
2024-07-26 02:46:29 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("Purchase");
|
2024-06-25 13:14:23 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.MediaFile", b =>
|
2024-06-23 17:04:11 +04:00
|
|
|
|
{
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.HasOne("DatabaseImplement.Models.Product", "Product")
|
2024-06-23 17:04:11 +04:00
|
|
|
|
.WithMany()
|
2024-07-26 02:46:29 +04:00
|
|
|
|
.HasForeignKey("ProductId")
|
2024-06-23 17:04:11 +04:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Navigation("Product");
|
2024-06-23 17:04:11 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Product", b =>
|
2024-06-23 17:04:11 +04:00
|
|
|
|
{
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.HasOne("DatabaseImplement.Models.Sale", "Sale")
|
2024-06-23 17:04:11 +04:00
|
|
|
|
.WithMany("Products")
|
2024-07-26 02:46:29 +04:00
|
|
|
|
.HasForeignKey("SaleId");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Sale");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Purchase", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.User", "User")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("UserId")
|
2024-06-23 17:04:11 +04:00
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
b.Navigation("User");
|
2024-06-23 17:04:11 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-06-24 15:06:42 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Sell", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.User", "User")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("UserId");
|
|
|
|
|
|
|
|
|
|
b.Navigation("User");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.SellProducts", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Product", "Product")
|
|
|
|
|
.WithMany("SellProducts")
|
|
|
|
|
.HasForeignKey("ProductId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Sell", "Sell")
|
|
|
|
|
.WithMany("Products")
|
|
|
|
|
.HasForeignKey("SellId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Product");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Sell");
|
|
|
|
|
});
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.SupplierProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Product", "Product")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ProductId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Supplier", "Supplier")
|
|
|
|
|
.WithMany("Products")
|
|
|
|
|
.HasForeignKey("SupplierId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Product");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Supplier");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Supply", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Supplier", "Supplier")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("SupplierId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Supplier");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.SupplyProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Product", "Product")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ProductId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Supply", "Supply")
|
|
|
|
|
.WithMany("Products")
|
|
|
|
|
.HasForeignKey("SupplyId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Product");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Supply");
|
|
|
|
|
});
|
|
|
|
|
|
2024-06-04 22:52:01 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.User", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Role", "Role")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("RoleId");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Role");
|
|
|
|
|
});
|
2024-06-22 21:16:08 +04:00
|
|
|
|
|
2024-06-23 17:04:11 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Product", b =>
|
|
|
|
|
{
|
2024-06-24 15:06:42 +04:00
|
|
|
|
b.Navigation("SellProducts");
|
2024-06-23 17:04:11 +04:00
|
|
|
|
});
|
|
|
|
|
|
2024-07-26 02:46:29 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Sale", b =>
|
2024-06-23 17:04:11 +04:00
|
|
|
|
{
|
|
|
|
|
b.Navigation("Products");
|
|
|
|
|
});
|
|
|
|
|
|
2024-06-24 15:06:42 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Sell", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Products");
|
|
|
|
|
});
|
|
|
|
|
|
2024-06-22 21:16:08 +04:00
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Supplier", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Products");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Supply", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Products");
|
|
|
|
|
});
|
2024-06-04 22:52:01 +04:00
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|