2314 lines
81 KiB
C#
2314 lines
81 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Netina.Repository.Models;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace NetinaShop.Repository.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationContext))]
|
|
[Migration("20241217212716_AddSubProduct")]
|
|
partial class AddSubProduct
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasDefaultSchema("public")
|
|
.HasAnnotation("ProductVersion", "8.0.8")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "fuzzystrmatch");
|
|
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "pg_trgm");
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("RoleClaims", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Claims", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Logins", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
|
{
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("UserRoles", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
|
{
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("Tokens", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Accounting.Payment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<double>("Amount")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<string>("Authority")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("CardPan")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("CustomerId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("FactorNumber")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("OrderId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("TransactionCode")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CustomerId");
|
|
|
|
b.HasIndex("OrderId");
|
|
|
|
b.ToTable("Payments", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.Blog", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("AuthorId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("CategoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsSuggested")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("ReadingTime")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Summery")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Tags")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AuthorId");
|
|
|
|
b.HasIndex("CategoryId");
|
|
|
|
b.ToTable("Blogs", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogCategory", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsMain")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid?>("ParentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.ToTable("BlogCategories", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Brands.Brand", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("EnglishName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("HasSpecialPage")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PageUrl")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PersianName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Brands", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Comments.Comment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Discriminator")
|
|
.IsRequired()
|
|
.HasMaxLength(21)
|
|
.HasColumnType("character varying(21)");
|
|
|
|
b.Property<bool>("IsAdmin")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRoot")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid?>("ParentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<float>("Rate")
|
|
.HasColumnType("real");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Comments", "public");
|
|
|
|
b.HasDiscriminator().HasValue("Comment");
|
|
|
|
b.UseTphMappingStrategy();
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Discounts.Discount", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("AmountType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Count")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<long>("DiscountAmount")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<int>("DiscountPercent")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Discriminator")
|
|
.IsRequired()
|
|
.HasMaxLength(21)
|
|
.HasColumnType("character varying(21)");
|
|
|
|
b.Property<DateTime>("ExpireDate")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<bool>("HasCode")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("HasPriceCeiling")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("HasPriceFloor")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("Immortal")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsForFirstPurchase")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsForInvitation")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsForSaleCooperation")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsInfinity")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsSpecialOffer")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid?>("MarketerId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<long>("PriceCeiling")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<long>("PriceFloor")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("StartDate")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<long>("UseCount")
|
|
.HasColumnType("bigint");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MarketerId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Discounts", "public");
|
|
|
|
b.HasDiscriminator().HasValue("Discount");
|
|
|
|
b.UseTphMappingStrategy();
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Orders.Order", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("CustomerId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("DeliveredAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<double>("DeliveryPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<string>("DiscountCode")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("DiscountCodePrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<Guid?>("DiscountId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<double>("DiscountPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<DateTime>("DoneAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("FactorCode")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsPayed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("OrderAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<int>("OrderStatus")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<double>("PackingPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<DateTime>("PayedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<int>("PaymentMethod")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("PreparingMinute")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<double>("ProductDiscountPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("ServicePrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<double>("TaxesPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<double>("TotalPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<double>("TotalProductsPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CustomerId");
|
|
|
|
b.HasIndex("DiscountId");
|
|
|
|
b.ToTable("Orders", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Orders.OrderDelivery", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("AddressId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("DeliveryCost")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("OrderId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("ShippingId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("TrackingCode")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AddressId");
|
|
|
|
b.HasIndex("OrderId")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("ShippingId");
|
|
|
|
b.ToTable("OrderDeliveries", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Orders.OrderProduct", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Count")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("HasDiscount")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("OrderId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("OrderProductStatus")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<double>("PackingCost")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<double>("PackingFee")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<Guid>("ProductCategoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<double>("ProductCost")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<double>("ProductFee")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<double>("ProductFeeWithDiscount")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("OrderId");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.ToTable("OrderProducts", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.ProductCategories.ProductCategory", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsMain")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid?>("ParentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.ToTable("ProductCategories", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.Product", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("AuthorId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("BeDisplayed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid>("BrandId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("CategoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<double>("Cost")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Discriminator")
|
|
.IsRequired()
|
|
.HasMaxLength(13)
|
|
.HasColumnType("character varying(13)");
|
|
|
|
b.Property<string>("EnglishName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ExpertCheck")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("HasExpressDelivery")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsEnable")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsSubProduct")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<int>("MaxOrderCount")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("PackingCost")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<string>("PersianName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<float>("Rate")
|
|
.HasColumnType("real");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("ReviewCount")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Stock")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Summery")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Tags")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Viewed")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Warranty")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AuthorId");
|
|
|
|
b.HasIndex("BrandId");
|
|
|
|
b.HasIndex("CategoryId");
|
|
|
|
b.ToTable("Products", "public");
|
|
|
|
b.HasDiscriminator().HasValue("Product");
|
|
|
|
b.UseTphMappingStrategy();
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.Specification", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Detail")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsFeature")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid?>("ParentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Value")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.ToTable("Specifications", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Seo.MetaTag", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Discriminator")
|
|
.IsRequired()
|
|
.HasMaxLength(34)
|
|
.HasColumnType("character varying(34)");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Value")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("MetaTags", "public");
|
|
|
|
b.HasDiscriminator().HasValue("MetaTag");
|
|
|
|
b.UseTphMappingStrategy();
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.StorageFiles.StorageFile", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Discriminator")
|
|
.IsRequired()
|
|
.HasMaxLength(34)
|
|
.HasColumnType("character varying(34)");
|
|
|
|
b.Property<string>("FileLocation")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("FileName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("FileType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<bool>("IsHeader")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsPrimary")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("StorageFiles", "public");
|
|
|
|
b.HasDiscriminator().HasValue("StorageFile");
|
|
|
|
b.UseTphMappingStrategy();
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.ApplicationRole", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("EnglishName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("PersianName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique()
|
|
.HasDatabaseName("RoleNameIndex");
|
|
|
|
b.ToTable("Roles", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.ApplicationUser", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("BirthDate")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Gender")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("NationalId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("SignUpStatus")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedEmail")
|
|
.HasDatabaseName("EmailIndex");
|
|
|
|
b.HasIndex("NormalizedUserName")
|
|
.IsUnique()
|
|
.HasDatabaseName("UserNameIndex");
|
|
|
|
b.ToTable("Users", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Customer", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Customers", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Manager", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<double>("LatestVersionUsed")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Managers", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Marketer", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("FatherName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("LastSettlement")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Shaba")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Marketers", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.NewsletterMember", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("NewsletterMembers", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.UserAddress", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Address")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("BuildingUnit")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("City")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<float>("LocationLat")
|
|
.HasColumnType("real");
|
|
|
|
b.Property<float>("LocationLong")
|
|
.HasColumnType("real");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Plaque")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PostalCode")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Province")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ReceiverFullName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ReceiverPhoneNumber")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("UserAddresses", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.UserFavoriteProduct", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("UserFavoriteProducts", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Warehouses.Shipping", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<double>("DeliveryCost")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<bool>("IsExpressShipping")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsOriginalWarehouse")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsShipBySeller")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTime>("ModifiedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("RemovedAt")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("RemovedBy")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("WarehouseName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("WorkingDays")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Shippings", "public");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogComment", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Comments.Comment");
|
|
|
|
b.Property<Guid>("BlogId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("BlogId");
|
|
|
|
b.HasDiscriminator().HasValue("BlogComment");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.ProductComment", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Comments.Comment");
|
|
|
|
b.Property<bool>("IsBuyer")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.HasDiscriminator().HasValue("ProductComment");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Discounts.CategoryDiscount", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Discounts.Discount");
|
|
|
|
b.Property<Guid>("CategoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("CategoryId");
|
|
|
|
b.HasDiscriminator().HasValue("CategoryDiscount");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Discounts.ProductDiscount", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Discounts.Discount");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.HasDiscriminator().HasValue("ProductDiscount");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.SubProduct", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Products.Product");
|
|
|
|
b.Property<int>("Diversity")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("DiversityDescription")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("DiversityValue")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid?>("ParentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.HasDiscriminator().HasValue("SubProduct");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogMetaTag", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Seo.MetaTag");
|
|
|
|
b.Property<Guid>("BlogId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("BlogId");
|
|
|
|
b.HasDiscriminator().HasValue("BlogMetaTag");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Brands.BrandMetaTag", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Seo.MetaTag");
|
|
|
|
b.Property<Guid>("BrandId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("BrandId");
|
|
|
|
b.HasDiscriminator().HasValue("BrandMetaTag");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.ProductCategories.ProductCategoryMetaTag", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Seo.MetaTag");
|
|
|
|
b.Property<Guid>("ProductCategoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("ProductCategoryId");
|
|
|
|
b.HasDiscriminator().HasValue("ProductCategoryMetaTag");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.ProductMetaTag", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.Seo.MetaTag");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.HasDiscriminator().HasValue("ProductMetaTag");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogStorageFile", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.StorageFiles.StorageFile");
|
|
|
|
b.Property<Guid>("BlogId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("BlogId");
|
|
|
|
b.HasDiscriminator().HasValue("BlogStorageFile");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Brands.BrandStorageFile", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.StorageFiles.StorageFile");
|
|
|
|
b.Property<Guid>("BrandId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("BrandId");
|
|
|
|
b.HasDiscriminator().HasValue("BrandStorageFile");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.ProductCategories.ProductCategoryStorageFile", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.StorageFiles.StorageFile");
|
|
|
|
b.Property<Guid>("CategoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("CategoryId");
|
|
|
|
b.HasDiscriminator().HasValue("ProductCategoryStorageFile");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.ProductStorageFile", b =>
|
|
{
|
|
b.HasBaseType("Netina.Domain.Entities.StorageFiles.StorageFile");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.HasDiscriminator().HasValue("ProductStorageFile");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Accounting.Payment", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.Customer", "Customer")
|
|
.WithMany()
|
|
.HasForeignKey("CustomerId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Orders.Order", "Order")
|
|
.WithMany("Payments")
|
|
.HasForeignKey("OrderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Customer");
|
|
|
|
b.Navigation("Order");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.Blog", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "Author")
|
|
.WithMany()
|
|
.HasForeignKey("AuthorId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Blogs.BlogCategory", "Category")
|
|
.WithMany("Blogs")
|
|
.HasForeignKey("CategoryId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Author");
|
|
|
|
b.Navigation("Category");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogCategory", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Blogs.BlogCategory", "Parent")
|
|
.WithMany()
|
|
.HasForeignKey("ParentId");
|
|
|
|
b.Navigation("Parent");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Comments.Comment", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Comments.Comment", "Parent")
|
|
.WithMany("Children")
|
|
.HasForeignKey("ParentId");
|
|
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Parent");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Discounts.Discount", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.Marketer", "Marketer")
|
|
.WithOne("Discount")
|
|
.HasForeignKey("Netina.Domain.Entities.Discounts.Discount", "MarketerId");
|
|
|
|
b.Navigation("Marketer");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Orders.Order", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.Customer", "Customer")
|
|
.WithMany()
|
|
.HasForeignKey("CustomerId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Discounts.Discount", null)
|
|
.WithMany("Orders")
|
|
.HasForeignKey("DiscountId");
|
|
|
|
b.Navigation("Customer");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Orders.OrderDelivery", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.UserAddress", "Address")
|
|
.WithMany()
|
|
.HasForeignKey("AddressId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Orders.Order", "Order")
|
|
.WithOne("OrderDelivery")
|
|
.HasForeignKey("Netina.Domain.Entities.Orders.OrderDelivery", "OrderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Warehouses.Shipping", "Shipping")
|
|
.WithMany()
|
|
.HasForeignKey("ShippingId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Address");
|
|
|
|
b.Navigation("Order");
|
|
|
|
b.Navigation("Shipping");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Orders.OrderProduct", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Orders.Order", "Order")
|
|
.WithMany("OrderProducts")
|
|
.HasForeignKey("OrderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Product")
|
|
.WithMany("OrderProducts")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Order");
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.ProductCategories.ProductCategory", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.ProductCategories.ProductCategory", "Parent")
|
|
.WithMany()
|
|
.HasForeignKey("ParentId");
|
|
|
|
b.Navigation("Parent");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.Product", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "Author")
|
|
.WithMany()
|
|
.HasForeignKey("AuthorId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Brands.Brand", "Brand")
|
|
.WithMany("Products")
|
|
.HasForeignKey("BrandId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.ProductCategories.ProductCategory", "Category")
|
|
.WithMany("Products")
|
|
.HasForeignKey("CategoryId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Author");
|
|
|
|
b.Navigation("Brand");
|
|
|
|
b.Navigation("Category");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.Specification", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Products.Specification", "Parent")
|
|
.WithMany("Children")
|
|
.HasForeignKey("ParentId");
|
|
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Product")
|
|
.WithMany("Specifications")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Parent");
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Customer", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
|
.WithOne("Customer")
|
|
.HasForeignKey("Netina.Domain.Entities.Users.Customer", "UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Manager", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
|
.WithOne("Manager")
|
|
.HasForeignKey("Netina.Domain.Entities.Users.Manager", "UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Marketer", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
|
.WithOne("Marketer")
|
|
.HasForeignKey("Netina.Domain.Entities.Users.Marketer", "UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.UserAddress", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
|
.WithMany("Addresses")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.UserFavoriteProduct", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Product")
|
|
.WithMany()
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Product");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogComment", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Blogs.Blog", "Blog")
|
|
.WithMany()
|
|
.HasForeignKey("BlogId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Blog");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.ProductComment", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Product")
|
|
.WithMany("Comments")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Discounts.CategoryDiscount", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.ProductCategories.ProductCategory", "Category")
|
|
.WithMany()
|
|
.HasForeignKey("CategoryId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Category");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Discounts.ProductDiscount", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Product")
|
|
.WithMany()
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.SubProduct", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Parent")
|
|
.WithMany("SubProducts")
|
|
.HasForeignKey("ParentId");
|
|
|
|
b.Navigation("Parent");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogMetaTag", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Blogs.Blog", "Brand")
|
|
.WithMany("MetaTags")
|
|
.HasForeignKey("BlogId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Brand");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Brands.BrandMetaTag", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Brands.Brand", "Brand")
|
|
.WithMany("MetaTags")
|
|
.HasForeignKey("BrandId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Brand");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.ProductCategories.ProductCategoryMetaTag", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.ProductCategories.ProductCategory", "ProductCategory")
|
|
.WithMany("MetaTags")
|
|
.HasForeignKey("ProductCategoryId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("ProductCategory");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.ProductMetaTag", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Product")
|
|
.WithMany("MetaTags")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogStorageFile", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Blogs.Blog", "Blog")
|
|
.WithMany("Files")
|
|
.HasForeignKey("BlogId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Blog");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Brands.BrandStorageFile", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Brands.Brand", "Brand")
|
|
.WithMany("Files")
|
|
.HasForeignKey("BrandId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Brand");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.ProductCategories.ProductCategoryStorageFile", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.ProductCategories.ProductCategory", "Category")
|
|
.WithMany("Files")
|
|
.HasForeignKey("CategoryId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Category");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.ProductStorageFile", b =>
|
|
{
|
|
b.HasOne("Netina.Domain.Entities.Products.Product", "Product")
|
|
.WithMany("Files")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.Blog", b =>
|
|
{
|
|
b.Navigation("Files");
|
|
|
|
b.Navigation("MetaTags");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Blogs.BlogCategory", b =>
|
|
{
|
|
b.Navigation("Blogs");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Brands.Brand", b =>
|
|
{
|
|
b.Navigation("Files");
|
|
|
|
b.Navigation("MetaTags");
|
|
|
|
b.Navigation("Products");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Comments.Comment", b =>
|
|
{
|
|
b.Navigation("Children");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Discounts.Discount", b =>
|
|
{
|
|
b.Navigation("Orders");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Orders.Order", b =>
|
|
{
|
|
b.Navigation("OrderDelivery");
|
|
|
|
b.Navigation("OrderProducts");
|
|
|
|
b.Navigation("Payments");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.ProductCategories.ProductCategory", b =>
|
|
{
|
|
b.Navigation("Files");
|
|
|
|
b.Navigation("MetaTags");
|
|
|
|
b.Navigation("Products");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.Product", b =>
|
|
{
|
|
b.Navigation("Comments");
|
|
|
|
b.Navigation("Files");
|
|
|
|
b.Navigation("MetaTags");
|
|
|
|
b.Navigation("OrderProducts");
|
|
|
|
b.Navigation("Specifications");
|
|
|
|
b.Navigation("SubProducts");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Products.Specification", b =>
|
|
{
|
|
b.Navigation("Children");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.ApplicationUser", b =>
|
|
{
|
|
b.Navigation("Addresses");
|
|
|
|
b.Navigation("Customer");
|
|
|
|
b.Navigation("Manager");
|
|
|
|
b.Navigation("Marketer");
|
|
});
|
|
|
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Marketer", b =>
|
|
{
|
|
b.Navigation("Discount");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|