//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NetinaShop.Repository.Models;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace NetinaShop.Repository.Migrations
{
[DbContext(typeof(ApplicationContext))]
[Migration("20240211102121_AddPayment")]
partial class AddPayment
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("public")
.HasAnnotation("ProductVersion", "8.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("ClaimType")
.HasColumnType("text");
b.Property("ClaimValue")
.HasColumnType("text");
b.Property("RoleId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("RoleClaims", "public");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("ClaimType")
.HasColumnType("text");
b.Property("ClaimValue")
.HasColumnType("text");
b.Property("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Claims", "public");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
{
b.Property("LoginProvider")
.HasColumnType("text");
b.Property("ProviderKey")
.HasColumnType("text");
b.Property("ProviderDisplayName")
.HasColumnType("text");
b.Property("UserId")
.HasColumnType("uuid");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("Logins", "public");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
{
b.Property("UserId")
.HasColumnType("uuid");
b.Property("RoleId")
.HasColumnType("uuid");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("UserRoles", "public");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
{
b.Property("UserId")
.HasColumnType("uuid");
b.Property("LoginProvider")
.HasColumnType("text");
b.Property("Name")
.HasColumnType("text");
b.Property("Value")
.HasColumnType("text");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("Tokens", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Accounting.Payment", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Amount")
.HasColumnType("double precision");
b.Property("Authority")
.IsRequired()
.HasColumnType("text");
b.Property("CardPan")
.IsRequired()
.HasColumnType("text");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("FactorNumber")
.IsRequired()
.HasColumnType("text");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("OrderId")
.HasColumnType("uuid");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("Status")
.HasColumnType("integer");
b.Property("TransactionCode")
.IsRequired()
.HasColumnType("text");
b.Property("Type")
.HasColumnType("integer");
b.Property("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("UserId");
b.ToTable("Payments", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Blogs.Blog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CategoryId")
.HasColumnType("uuid");
b.Property("Content")
.IsRequired()
.HasColumnType("text");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("IsSuggested")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("ReadingTime")
.HasColumnType("integer");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("Summery")
.IsRequired()
.HasColumnType("text");
b.Property("Tags")
.IsRequired()
.HasColumnType("text");
b.Property("Title")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("CategoryId");
b.ToTable("Blogs", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Blogs.BlogCategory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("BlogCategories", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Brands.Brand", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("HasSpecialPage")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("PageUrl")
.IsRequired()
.HasColumnType("text");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Brands", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Discounts.Discount", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AmountType")
.HasColumnType("integer");
b.Property("Code")
.IsRequired()
.HasColumnType("text");
b.Property("Count")
.HasColumnType("integer");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("DiscountAmount")
.HasColumnType("bigint");
b.Property("DiscountPercent")
.HasColumnType("integer");
b.Property("Discriminator")
.IsRequired()
.HasMaxLength(21)
.HasColumnType("character varying(21)");
b.Property("ExpireDate")
.HasColumnType("timestamp without time zone");
b.Property("HasCode")
.HasColumnType("boolean");
b.Property("HasPriceCeiling")
.HasColumnType("boolean");
b.Property("HasPriceFloor")
.HasColumnType("boolean");
b.Property("IsForInvitation")
.HasColumnType("boolean");
b.Property("IsInfinity")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("IsSpecialOffer")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("PriceCeiling")
.HasColumnType("bigint");
b.Property("PriceFloor")
.HasColumnType("bigint");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("StartDate")
.HasColumnType("timestamp without time zone");
b.Property("Type")
.HasColumnType("integer");
b.Property("UseCount")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("Discounts", "public");
b.HasDiscriminator("Discriminator").HasValue("Discount");
b.UseTphMappingStrategy();
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Orders.Order", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("DeliveryPrice")
.HasColumnType("double precision");
b.Property("DiscountCode")
.IsRequired()
.HasColumnType("text");
b.Property("DiscountId")
.HasColumnType("uuid");
b.Property("DiscountPrice")
.HasColumnType("double precision");
b.Property("DoneAt")
.HasColumnType("timestamp without time zone");
b.Property("FactorCode")
.IsRequired()
.HasColumnType("text");
b.Property("IsPayed")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("OrderAt")
.HasColumnType("timestamp without time zone");
b.Property("OrderStatus")
.HasColumnType("integer");
b.Property("PackingPrice")
.HasColumnType("double precision");
b.Property("PayedAt")
.HasColumnType("timestamp without time zone");
b.Property("PaymentMethod")
.HasColumnType("integer");
b.Property("PreparingMinute")
.HasColumnType("integer");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("ServicePrice")
.HasColumnType("double precision");
b.Property("TaxesPrice")
.HasColumnType("double precision");
b.Property("TotalPrice")
.HasColumnType("double precision");
b.Property("TotalProductsPrice")
.HasColumnType("double precision");
b.Property("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("DiscountId");
b.HasIndex("UserId");
b.ToTable("Orders", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Orders.OrderDelivery", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Address")
.IsRequired()
.HasColumnType("text");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("DeliveryCost")
.HasColumnType("double precision");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("OrderId")
.HasColumnType("uuid");
b.Property("PostalCode")
.IsRequired()
.HasColumnType("text");
b.Property("ReceiverFullName")
.IsRequired()
.HasColumnType("text");
b.Property("ReceiverPhoneNumber")
.IsRequired()
.HasColumnType("text");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("ShippingId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("ShippingId");
b.ToTable("OrderDeliveries", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Orders.OrderProduct", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Count")
.HasColumnType("integer");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("HasDiscount")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("OrderId")
.HasColumnType("uuid");
b.Property("OrderProductStatus")
.HasColumnType("integer");
b.Property("PackingCost")
.HasColumnType("double precision");
b.Property("PackingFee")
.HasColumnType("double precision");
b.Property("ProductCategoryId")
.HasColumnType("uuid");
b.Property("ProductCost")
.HasColumnType("double precision");
b.Property("ProductFee")
.HasColumnType("double precision");
b.Property("ProductFeeWithDiscount")
.HasColumnType("double precision");
b.Property("ProductId")
.HasColumnType("uuid");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("ProductId");
b.ToTable("OrderProducts", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.ProductCategories.ProductCategory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("IsMain")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("ParentId")
.HasColumnType("uuid");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ParentId");
b.ToTable("ProductCategories", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Products.Product", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("BeDisplayed")
.HasColumnType("boolean");
b.Property("BrandId")
.HasColumnType("uuid");
b.Property("CategoryId")
.HasColumnType("uuid");
b.Property("Cost")
.HasColumnType("double precision");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("EnglishName")
.IsRequired()
.HasColumnType("text");
b.Property("ExpertCheck")
.IsRequired()
.HasColumnType("text");
b.Property("HasExpressDelivery")
.HasColumnType("boolean");
b.Property("IsEnable")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("MaxOrderCount")
.HasColumnType("integer");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("PackingCost")
.HasColumnType("double precision");
b.Property("PersianName")
.IsRequired()
.HasColumnType("text");
b.Property("Rate")
.HasColumnType("real");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("ReviewCount")
.HasColumnType("integer");
b.Property("Stock")
.HasColumnType("integer");
b.Property("Summery")
.IsRequired()
.HasColumnType("text");
b.Property("Tags")
.IsRequired()
.HasColumnType("text");
b.Property("Viewed")
.HasColumnType("integer");
b.Property("Warranty")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("BrandId");
b.HasIndex("CategoryId");
b.ToTable("Products", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Products.Review", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Comment")
.IsRequired()
.HasColumnType("text");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("IsBuyer")
.HasColumnType("boolean");
b.Property("IsConfirmed")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("ProductId")
.HasColumnType("uuid");
b.Property("Rate")
.HasColumnType("real");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("Title")
.IsRequired()
.HasColumnType("text");
b.Property("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ProductId");
b.HasIndex("UserId");
b.ToTable("Reviews", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Products.Specification", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("Detail")
.IsRequired()
.HasColumnType("text");
b.Property("IsFeature")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("ParentId")
.HasColumnType("uuid");
b.Property("ProductId")
.HasColumnType("uuid");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.Property("Title")
.IsRequired()
.HasColumnType("text");
b.Property("Value")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ParentId");
b.HasIndex("ProductId");
b.ToTable("Specifications", "public");
});
modelBuilder.Entity("NetinaShop.Domain.Entities.StorageFiles.StorageFile", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp without time zone");
b.Property("CreatedBy")
.HasColumnType("text");
b.Property("Discriminator")
.IsRequired()
.HasMaxLength(34)
.HasColumnType("character varying(34)");
b.Property("FileLocation")
.IsRequired()
.HasColumnType("text");
b.Property("FileName")
.IsRequired()
.HasColumnType("text");
b.Property("FileType")
.HasColumnType("integer");
b.Property("IsHeader")
.HasColumnType("boolean");
b.Property("IsPrimary")
.HasColumnType("boolean");
b.Property("IsRemoved")
.HasColumnType("boolean");
b.Property("ModifiedAt")
.HasColumnType("timestamp without time zone");
b.Property("ModifiedBy")
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("RemovedAt")
.HasColumnType("timestamp without time zone");
b.Property("RemovedBy")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("StorageFiles", "public");
b.HasDiscriminator("Discriminator").HasValue("StorageFile");
b.UseTphMappingStrategy();
});
modelBuilder.Entity("NetinaShop.Domain.Entities.Users.ApplicationRole", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
b.Property("Description")
.IsRequired()
.HasColumnType("text");
b.Property("EnglishName")
.IsRequired()
.HasColumnType("text");
b.Property