From 8f8e5b8033b65e7a46cf12b57cdadcf0c486af6c Mon Sep 17 00:00:00 2001 From: DELL Date: Thu, 22 May 2025 15:58:38 +0530 Subject: [PATCH 1/4] chnages as hi --- src/SimplCommerce.WebHost/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SimplCommerce.WebHost/Program.cs b/src/SimplCommerce.WebHost/Program.cs index 590ab3920..2509b1c9c 100644 --- a/src/SimplCommerce.WebHost/Program.cs +++ b/src/SimplCommerce.WebHost/Program.cs @@ -27,6 +27,7 @@ Configure(); app.Run(); +//hi void ConfigureService() { var connectionString = builder.Configuration.GetConnectionString("DefaultConnection"); From 5e0a545ff0e5e34c1b9113fddfb4b7c0f42382b8 Mon Sep 17 00:00:00 2001 From: DELL Date: Sat, 24 May 2025 14:14:03 +0530 Subject: [PATCH 2/4] Resolve:Add Product Feed Generation Endpoint #1133 --- .../Catalog/Controllers/FeedController.cs | 26 + .../Areas/Catalog/Views/Feed/Index.cshtml | 180 + .../Areas/Core/Controllers/HomeController.cs | 35 + .../20250523054111_waqar.Designer.cs | 4767 +++++++++++++++++ .../Migrations/20250523054111_waqar.cs | 22 + .../Views/Shared/_Layout.cshtml | 4 + .../Views/Shared/_LoginPartial.cshtml | 10 + src/SimplCommerce.WebHost/appsettings.json | 6 +- src/SimplCommerce.WebHost/tempkey.jwk | 1 + 9 files changed, 5048 insertions(+), 3 deletions(-) create mode 100644 src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/FeedController.cs create mode 100644 src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml create mode 100644 src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs create mode 100644 src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs create mode 100644 src/SimplCommerce.WebHost/tempkey.jwk diff --git a/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/FeedController.cs b/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/FeedController.cs new file mode 100644 index 000000000..0ee481dbc --- /dev/null +++ b/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Controllers/FeedController.cs @@ -0,0 +1,26 @@ +using SimplCommerce.Module.Catalog.Models; +using SimplCommerce.Module.Catalog.Services; +using Microsoft.AspNetCore.Mvc; +using System.Linq; +using SimplCommerce.Infrastructure.Data; +using Microsoft.EntityFrameworkCore; + +namespace SimplCommerce.Module.Catalog.Controllers +{ + [Area("Catalog")] + public class FeedController : Controller + { + private readonly IRepository _productRepository; + + public FeedController(IRepository productRepository) + { + _productRepository = productRepository; + } + + public IActionResult Index() + { + var products = _productRepository.Query().Include(p => p.ThumbnailImage).ToList(); + return View(products); + } + } +} diff --git a/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml b/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml new file mode 100644 index 000000000..8be57cd0d --- /dev/null +++ b/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml @@ -0,0 +1,180 @@ + +@model List + +@using System.Text.RegularExpressions + + + + + + All Products + + + +

All Products

+ +
+ @foreach (var product in Model) + { +
+ @product.Name + +

@product.Name

+

@Html.Raw(Regex.Replace(product.Description, "<.*?>", string.Empty))

+ Price: ₹@product.Price.ToString("F2") +
+ } +
+ + + + + + + + + + + + + + + +@* most importanty *@ +@* @model List +@using System.Text.RegularExpressions + + +@{ + ViewData["Title"] = "Feed"; +} + +

Product Feed

+ +@foreach (var product in Model) +{ +
+ @product.Name + +

@product.Name

+

@Html.Raw(Regex.Replace(product.Description, "<.*?>", string.Empty))

+ Price: ₹@product.Price.ToString("F2") +
+} + + + *@ + + + + +@* @model IEnumerable + +

Product Feed

+ +@* @foreach (var product in Model) +{ +
+

@product.Name

+ + @if (!string.IsNullOrEmpty(product.ThumbnailImage)) + { + @product.Name + } + else + { +

No Image Available

+ } + +

@Html.Raw(product.ShortDescription)

+ Price: @product.Price.ToString("C") +
+} + *@ + + +@* @foreach (var product in Model) +{ +
+

@product.Name

+ @product.Name +

@Html.Raw(product.ShortDescription)

+ Price: @product.Price.ToString("C") +
+} *@ + + +@* @foreach (var product in Model) +{ +
+

@product.Name

+ @product.Name +

@product.ShortDescription

+ Price: @product.Price.ToString("C") +
+} *@ diff --git a/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs b/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs index 40a46f116..99a8eb70f 100644 --- a/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs +++ b/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Threading.Tasks; using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; @@ -29,6 +30,40 @@ public IActionResult TestError() throw new Exception("Test behavior in case of error"); } + /// + /// + /// + /// + + //[HttpGet("/feed")] + //public IActionResult Feed() + //{ + // var products = _productRepository.Query() + // .Where(p => p.IsPublished && !p.IsDeleted) + // .OrderByDescending(p => p.CreatedOn) + // .Select(p => new ProductFeedViewModel + // { + // Id = p.Id, + // Name = p.Name, + // ThumbnailImage = p.ThumbnailImage, + // ShortDescription = p.ShortDescription, + // Price = p.Price + // }).ToList(); + + // return View(products); + //} + + + + + + + + + + /// + /// + [HttpGet("/")] public IActionResult Index() { diff --git a/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs b/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs new file mode 100644 index 000000000..019fa19b8 --- /dev/null +++ b/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs @@ -0,0 +1,4767 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using SimplCommerce.Module.Core.Data; + +#nullable disable + +namespace SimplCommerce.WebHost.Migrations +{ + [DbContext(typeof(SimplDbContext))] + [Migration("20250523054111_waqar")] + partial class waqar + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("Core_RoleClaim", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Core_UserClaim", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("Core_UserLogin", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("bigint"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("Core_UserToken", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Culture", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Localization_Culture", (string)null); + + b.HasData( + new + { + Id = "en-US", + Name = "English (US)" + }); + }); + + modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.LocalizedContentProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CultureId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("EntityId") + .HasColumnType("bigint"); + + b.Property("EntityType") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ProperyName") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CultureId"); + + b.ToTable("Localization_LocalizedContentProperty", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Resource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CultureId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CultureId"); + + b.ToTable("Localization_Resource", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.ActivityLog.Models.Activity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ActivityTypeId") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("EntityId") + .HasColumnType("bigint"); + + b.Property("EntityTypeId") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ActivityTypeId"); + + b.ToTable("ActivityLog_Activity", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.ActivityLog.Models.ActivityType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("ActivityLog_ActivityType", (string)null); + + b.HasData( + new + { + Id = 1L, + Name = "EntityView" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Brand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Catalog_Brand", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("IncludeInMenu") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("MetaDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaKeywords") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("MetaTitle") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ThumbnailImageId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.HasIndex("ThumbnailImageId"); + + b.ToTable("Catalog_Category", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BrandId") + .HasColumnType("bigint"); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("Gtin") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("HasOptions") + .HasColumnType("bit"); + + b.Property("IsAllowToOrder") + .HasColumnType("bit"); + + b.Property("IsCallForPricing") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFeatured") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("IsVisibleIndividually") + .HasColumnType("bit"); + + b.Property("LatestUpdatedById") + .HasColumnType("bigint"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("MetaDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaKeywords") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("MetaTitle") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("NormalizedName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("OldPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("PublishedOn") + .HasColumnType("datetimeoffset"); + + b.Property("RatingAverage") + .HasColumnType("float"); + + b.Property("ReviewsCount") + .HasColumnType("int"); + + b.Property("ShortDescription") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Sku") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("SpecialPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("SpecialPriceEnd") + .HasColumnType("datetimeoffset"); + + b.Property("SpecialPriceStart") + .HasColumnType("datetimeoffset"); + + b.Property("Specification") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQuantity") + .HasColumnType("int"); + + b.Property("StockTrackingIsEnabled") + .HasColumnType("bit"); + + b.Property("TaxClassId") + .HasColumnType("bigint"); + + b.Property("ThumbnailImageId") + .HasColumnType("bigint"); + + b.Property("VendorId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("BrandId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("LatestUpdatedById"); + + b.HasIndex("TaxClassId"); + + b.HasIndex("ThumbnailImageId"); + + b.ToTable("Catalog_Product", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttribute", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("GroupId"); + + b.ToTable("Catalog_ProductAttribute", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Catalog_ProductAttributeGroup", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AttributeId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AttributeId"); + + b.HasIndex("ProductId"); + + b.ToTable("Catalog_ProductAttributeValue", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CategoryId") + .HasColumnType("bigint"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("IsFeaturedProduct") + .HasColumnType("bit"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.HasIndex("ProductId"); + + b.ToTable("Catalog_ProductCategory", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductLink", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("LinkType") + .HasColumnType("int"); + + b.Property("LinkedProductId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("LinkedProductId"); + + b.HasIndex("ProductId"); + + b.ToTable("Catalog_ProductLink", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductMedia", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("MediaId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("MediaId"); + + b.HasIndex("ProductId"); + + b.ToTable("Catalog_ProductMedia", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOption", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Catalog_ProductOption", (string)null); + + b.HasData( + new + { + Id = 1L, + Name = "Color" + }, + new + { + Id = 2L, + Name = "Size" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionCombination", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("OptionId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("SortIndex") + .HasColumnType("int"); + + b.Property("Value") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("OptionId"); + + b.HasIndex("ProductId"); + + b.ToTable("Catalog_ProductOptionCombination", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DisplayType") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("OptionId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("SortIndex") + .HasColumnType("int"); + + b.Property("Value") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("OptionId"); + + b.HasIndex("ProductId"); + + b.ToTable("Catalog_ProductOptionValue", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductPriceHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("OldPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("SpecialPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("SpecialPriceEnd") + .HasColumnType("datetimeoffset"); + + b.Property("SpecialPriceStart") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("ProductId"); + + b.ToTable("Catalog_ProductPriceHistory", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Catalog_ProductTemplate", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplateProductAttribute", b => + { + b.Property("ProductTemplateId") + .HasColumnType("bigint"); + + b.Property("ProductAttributeId") + .HasColumnType("bigint"); + + b.HasKey("ProductTemplateId", "ProductAttributeId"); + + b.HasIndex("ProductAttributeId"); + + b.ToTable("Catalog_ProductTemplateProductAttribute", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.Checkout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CouponCode") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CouponRuleName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("CustomerId") + .HasColumnType("bigint"); + + b.Property("IsProductPriceIncludeTax") + .HasColumnType("bit"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("OrderNote") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ShippingAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("ShippingData") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingMethod") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("TaxAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("VendorId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("CustomerId"); + + b.ToTable("Checkouts_Checkout", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.CheckoutItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CheckoutId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CheckoutId"); + + b.HasIndex("ProductId"); + + b.ToTable("Checkouts_CheckoutItem", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("IsSystem") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Cms_Menu", (string)null); + + b.HasData( + new + { + Id = 1L, + IsPublished = true, + IsSystem = true, + Name = "Customer Services" + }, + new + { + Id = 2L, + IsPublished = true, + IsSystem = true, + Name = "Information" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Cms.Models.MenuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CustomLink") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("EntityId") + .HasColumnType("bigint"); + + b.Property("MenuId") + .HasColumnType("bigint"); + + b.Property("Name") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("EntityId"); + + b.HasIndex("MenuId"); + + b.HasIndex("ParentId"); + + b.ToTable("Cms_MenuItem", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Page", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Body") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LatestUpdatedById") + .HasColumnType("bigint"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("MetaDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaKeywords") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("MetaTitle") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("PublishedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("LatestUpdatedById"); + + b.ToTable("Cms_Page", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Comments.Models.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CommentText") + .HasColumnType("nvarchar(max)"); + + b.Property("CommenterName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("EntityId") + .HasColumnType("bigint"); + + b.Property("EntityTypeId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.HasIndex("UserId"); + + b.ToTable("Comments_Comment", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Contacts.Models.Contact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ContactAreaId") + .HasColumnType("bigint"); + + b.Property("Content") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("EmailAddress") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("FullName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("PhoneNumber") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("ContactAreaId"); + + b.ToTable("Contacts_Contact", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Contacts.Models.ContactArea", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Contacts_ContactArea", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Address", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AddressLine1") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("AddressLine2") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("City") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ContactName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CountryId") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("DistrictId") + .HasColumnType("bigint"); + + b.Property("Phone") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("StateOrProvinceId") + .HasColumnType("bigint"); + + b.Property("ZipCode") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("DistrictId"); + + b.HasIndex("StateOrProvinceId"); + + b.ToTable("Core_Address", (string)null); + + b.HasData( + new + { + Id = 1L, + AddressLine1 = "364 Cong Hoa", + ContactName = "Thien Nguyen", + CountryId = "VN", + StateOrProvinceId = 1L + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.AppSetting", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("IsVisibleInCommonSettingPage") + .HasColumnType("bit"); + + b.Property("Module") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Core_AppSetting", (string)null); + + b.HasData( + new + { + Id = "Catalog.ProductPageSize", + IsVisibleInCommonSettingPage = true, + Module = "Catalog", + Value = "10" + }, + new + { + Id = "Catalog.IsProductPriceIncludeTax", + IsVisibleInCommonSettingPage = true, + Module = "Catalog", + Value = "true" + }, + new + { + Id = "Catalog.MinimumProductQuantityForHighlighting", + IsVisibleInCommonSettingPage = true, + Module = "Catalog", + Value = "5" + }, + new + { + Id = "Catalog.IsCommentsRequireApproval", + IsVisibleInCommonSettingPage = true, + Module = "Catalog", + Value = "true" + }, + new + { + Id = "GoogleAppKey", + IsVisibleInCommonSettingPage = false, + Module = "Contact", + Value = "" + }, + new + { + Id = "Global.AssetVersion", + IsVisibleInCommonSettingPage = true, + Module = "Core", + Value = "1.0" + }, + new + { + Id = "Global.AssetBundling", + IsVisibleInCommonSettingPage = true, + Module = "Core", + Value = "false" + }, + new + { + Id = "Theme", + IsVisibleInCommonSettingPage = false, + Module = "Core", + Value = "Generic" + }, + new + { + Id = "Global.DefaultCultureUI", + IsVisibleInCommonSettingPage = true, + Module = "Core", + Value = "en-US" + }, + new + { + Id = "Global.DefaultCultureAdminUI", + IsVisibleInCommonSettingPage = true, + Module = "Core", + Value = "en-US" + }, + new + { + Id = "Global.CurrencyCulture", + IsVisibleInCommonSettingPage = true, + Module = "Core", + Value = "en-US" + }, + new + { + Id = "Global.CurrencyDecimalPlace", + IsVisibleInCommonSettingPage = true, + Module = "Core", + Value = "2" + }, + new + { + Id = "SmtpServer", + IsVisibleInCommonSettingPage = false, + Module = "EmailSenderSmpt", + Value = "smtp.gmail.com" + }, + new + { + Id = "SmtpPort", + IsVisibleInCommonSettingPage = false, + Module = "EmailSenderSmpt", + Value = "587" + }, + new + { + Id = "SmtpUsername", + IsVisibleInCommonSettingPage = false, + Module = "EmailSenderSmpt", + Value = "" + }, + new + { + Id = "SmtpPassword", + IsVisibleInCommonSettingPage = false, + Module = "EmailSenderSmpt", + Value = "" + }, + new + { + Id = "Localization.LocalizedConentEnable", + IsVisibleInCommonSettingPage = true, + Module = "Localization", + Value = "true" + }, + new + { + Id = "News.PageSize", + IsVisibleInCommonSettingPage = true, + Module = "News", + Value = "10" + }, + new + { + Id = "Tax.DefaultTaxClassId", + IsVisibleInCommonSettingPage = true, + Module = "Tax", + Value = "1" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Country", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Code3") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("IsBillingEnabled") + .HasColumnType("bit"); + + b.Property("IsCityEnabled") + .HasColumnType("bit"); + + b.Property("IsDistrictEnabled") + .HasColumnType("bit"); + + b.Property("IsShippingEnabled") + .HasColumnType("bit"); + + b.Property("IsZipCodeEnabled") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Core_Country", (string)null); + + b.HasData( + new + { + Id = "VN", + Code3 = "VNM", + IsBillingEnabled = true, + IsCityEnabled = false, + IsDistrictEnabled = true, + IsShippingEnabled = true, + IsZipCodeEnabled = false, + Name = "Việt Nam" + }, + new + { + Id = "US", + Code3 = "USA", + IsBillingEnabled = true, + IsCityEnabled = true, + IsDistrictEnabled = false, + IsShippingEnabled = true, + IsZipCodeEnabled = true, + Name = "United States" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Core_CustomerGroup", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroupUser", b => + { + b.Property("UserId") + .HasColumnType("bigint"); + + b.Property("CustomerGroupId") + .HasColumnType("bigint"); + + b.HasKey("UserId", "CustomerGroupId"); + + b.HasIndex("CustomerGroupId"); + + b.ToTable("Core_CustomerGroupUser", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.District", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Location") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("StateOrProvinceId") + .HasColumnType("bigint"); + + b.Property("Type") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("StateOrProvinceId"); + + b.ToTable("Core_District", (string)null); + + b.HasData( + new + { + Id = 1L, + Name = "Quận 1", + StateOrProvinceId = 1L, + Type = "Quận" + }, + new + { + Id = 2L, + Name = "Quận 2", + StateOrProvinceId = 1L, + Type = "Quận" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Entity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint"); + + b.Property("EntityTypeId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("Core_Entity", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.EntityType", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AreaName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("IsMenuable") + .HasColumnType("bit"); + + b.Property("RoutingAction") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("RoutingController") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Core_EntityType", (string)null); + + b.HasData( + new + { + Id = "Category", + AreaName = "Catalog", + IsMenuable = true, + RoutingAction = "CategoryDetail", + RoutingController = "Category" + }, + new + { + Id = "Brand", + AreaName = "Catalog", + IsMenuable = true, + RoutingAction = "BrandDetail", + RoutingController = "Brand" + }, + new + { + Id = "Product", + AreaName = "Catalog", + IsMenuable = false, + RoutingAction = "ProductDetail", + RoutingController = "Product" + }, + new + { + Id = "Page", + AreaName = "Cms", + IsMenuable = true, + RoutingAction = "PageDetail", + RoutingController = "Page" + }, + new + { + Id = "Vendor", + AreaName = "Core", + IsMenuable = false, + RoutingAction = "VendorDetail", + RoutingController = "Vendor" + }, + new + { + Id = "NewsCategory", + AreaName = "News", + IsMenuable = true, + RoutingAction = "NewsCategoryDetail", + RoutingController = "NewsCategory" + }, + new + { + Id = "NewsItem", + AreaName = "News", + IsMenuable = false, + RoutingAction = "NewsItemDetail", + RoutingController = "NewsItem" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Media", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Caption") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("FileName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("FileSize") + .HasColumnType("int"); + + b.Property("MediaType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Core_Media", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Role", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("Core_Role", (string)null); + + b.HasData( + new + { + Id = 1L, + ConcurrencyStamp = "4776a1b2-dbe4-4056-82ec-8bed211d1454", + Name = "admin", + NormalizedName = "ADMIN" + }, + new + { + Id = 2L, + ConcurrencyStamp = "00d172be-03a0-4856-8b12-26d63fcf4374", + Name = "customer", + NormalizedName = "CUSTOMER" + }, + new + { + Id = 3L, + ConcurrencyStamp = "d4754388-8355-4018-b728-218018836817", + Name = "guest", + NormalizedName = "GUEST" + }, + new + { + Id = 4L, + ConcurrencyStamp = "71f10604-8c4d-4a7d-ac4a-ffefb11cefeb", + Name = "vendor", + NormalizedName = "VENDOR" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.StateOrProvince", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Code") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CountryId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Type") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.ToTable("Core_StateOrProvince", (string)null); + + b.HasData( + new + { + Id = 1L, + CountryId = "VN", + Name = "Hồ Chí Minh", + Type = "Thành Phố" + }, + new + { + Id = 2L, + Code = "WA", + CountryId = "US", + Name = "Washington" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Culture") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("DefaultBillingAddressId") + .HasColumnType("bigint"); + + b.Property("DefaultShippingAddressId") + .HasColumnType("bigint"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("ExtensionData") + .HasColumnType("nvarchar(max)"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("RefreshTokenHash") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UserGuid") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("VendorId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("DefaultBillingAddressId"); + + b.HasIndex("DefaultShippingAddressId"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.HasIndex("VendorId"); + + b.ToTable("Core_User", (string)null); + + b.HasData( + new + { + Id = 2L, + AccessFailedCount = 0, + ConcurrencyStamp = "101cd6ae-a8ef-4a37-97fd-04ac2dd630e4", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + Email = "system@simplcommerce.com", + EmailConfirmed = false, + FullName = "System User", + IsDeleted = true, + LatestUpdatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + LockoutEnabled = false, + NormalizedEmail = "SYSTEM@SIMPLCOMMERCE.COM", + NormalizedUserName = "SYSTEM@SIMPLCOMMERCE.COM", + PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", + PhoneNumberConfirmed = false, + SecurityStamp = "a9565acb-cee6-425f-9833-419a793f5fba", + TwoFactorEnabled = false, + UserGuid = new Guid("5f72f83b-7436-4221-869c-1b69b2e23aae"), + UserName = "system@simplcommerce.com" + }, + new + { + Id = 10L, + AccessFailedCount = 0, + ConcurrencyStamp = "c83afcbc-312c-4589-bad7-8686bd4754c0", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + Email = "admin@simplcommerce.com", + EmailConfirmed = false, + FullName = "Shop Admin", + IsDeleted = false, + LatestUpdatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + LockoutEnabled = false, + NormalizedEmail = "ADMIN@SIMPLCOMMERCE.COM", + NormalizedUserName = "ADMIN@SIMPLCOMMERCE.COM", + PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", + PhoneNumberConfirmed = false, + SecurityStamp = "d6847450-47f0-4c7a-9fed-0c66234bf61f", + TwoFactorEnabled = false, + UserGuid = new Guid("ed8210c3-24b0-4823-a744-80078cf12eb4"), + UserName = "admin@simplcommerce.com" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserAddress", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AddressId") + .HasColumnType("bigint"); + + b.Property("AddressType") + .HasColumnType("int"); + + b.Property("LastUsedOn") + .HasColumnType("datetimeoffset"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("AddressId"); + + b.HasIndex("UserId"); + + b.ToTable("Core_UserAddress", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserRole", b => + { + b.Property("UserId") + .HasColumnType("bigint"); + + b.Property("RoleId") + .HasColumnType("bigint"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("Core_UserRole", (string)null); + + b.HasData( + new + { + UserId = 10L, + RoleId = 1L + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Vendor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Core_Vendor", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Widget", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("CreateUrl") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("EditUrl") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ViewComponentName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Core_Widget", (string)null); + + b.HasData( + new + { + Id = "CategoryWidget", + CreateUrl = "widget-category-create", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 160, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + EditUrl = "widget-category-edit", + IsPublished = false, + Name = "Category Widget", + ViewComponentName = "CategoryWidget" + }, + new + { + Id = "ProductWidget", + CreateUrl = "widget-product-create", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + EditUrl = "widget-product-edit", + IsPublished = false, + Name = "Product Widget", + ViewComponentName = "ProductWidget" + }, + new + { + Id = "SimpleProductWidget", + CreateUrl = "widget-simple-product-create", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + EditUrl = "widget-simple-product-edit", + IsPublished = false, + Name = "Simple Product Widget", + ViewComponentName = "SimpleProductWidget" + }, + new + { + Id = "HtmlWidget", + CreateUrl = "widget-html-create", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + EditUrl = "widget-html-edit", + IsPublished = false, + Name = "Html Widget", + ViewComponentName = "HtmlWidget" + }, + new + { + Id = "CarouselWidget", + CreateUrl = "widget-carousel-create", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + EditUrl = "widget-carousel-edit", + IsPublished = false, + Name = "Carousel Widget", + ViewComponentName = "CarouselWidget" + }, + new + { + Id = "SpaceBarWidget", + CreateUrl = "widget-spacebar-create", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + EditUrl = "widget-spacebar-edit", + IsPublished = false, + Name = "SpaceBar Widget", + ViewComponentName = "SpaceBarWidget" + }, + new + { + Id = "RecentlyViewedWidget", + CreateUrl = "widget-recently-viewed-create", + CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), + EditUrl = "widget-recently-viewed-edit", + IsPublished = false, + Name = "Recently Viewed Widget", + ViewComponentName = "RecentlyViewedWidget" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.WidgetInstance", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Data") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("HtmlData") + .HasColumnType("nvarchar(max)"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("PublishEnd") + .HasColumnType("datetimeoffset"); + + b.Property("PublishStart") + .HasColumnType("datetimeoffset"); + + b.Property("WidgetId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("WidgetZoneId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("WidgetId"); + + b.HasIndex("WidgetZoneId"); + + b.ToTable("Core_WidgetInstance", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.WidgetZone", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Core_WidgetZone", (string)null); + + b.HasData( + new + { + Id = 1L, + Name = "Home Featured" + }, + new + { + Id = 2L, + Name = "Home Main Content" + }, + new + { + Id = 3L, + Name = "Home After Main Content" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.ProductBackInStockSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CustomerEmail") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("Inventory_ProductBackInStockSubscription", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Stock", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("ReservedQuantity") + .HasColumnType("int"); + + b.Property("WarehouseId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.HasIndex("WarehouseId"); + + b.ToTable("Inventory_Stock", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.StockHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AdjustedQuantity") + .HasColumnType("bigint"); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Note") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("WarehouseId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("ProductId"); + + b.HasIndex("WarehouseId"); + + b.ToTable("Inventory_StockHistory", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Warehouse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AddressId") + .HasColumnType("bigint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("VendorId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("AddressId"); + + b.HasIndex("VendorId"); + + b.ToTable("Inventory_Warehouse", (string)null); + + b.HasData( + new + { + Id = 1L, + AddressId = 1L, + Name = "Default warehouse" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("MetaDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaKeywords") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("MetaTitle") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("News_NewsCategory", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("FullContent") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LatestUpdatedById") + .HasColumnType("bigint"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("MetaDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaKeywords") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("MetaTitle") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("PublishedOn") + .HasColumnType("datetimeoffset"); + + b.Property("ShortContent") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ThumbnailImageId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("LatestUpdatedById"); + + b.HasIndex("ThumbnailImageId"); + + b.ToTable("News_NewsItem", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItemCategory", b => + { + b.Property("CategoryId") + .HasColumnType("bigint"); + + b.Property("NewsItemId") + .HasColumnType("bigint"); + + b.HasKey("CategoryId", "NewsItemId"); + + b.HasIndex("NewsItemId"); + + b.ToTable("News_NewsItemCategory", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.Order", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BillingAddressId") + .HasColumnType("bigint"); + + b.Property("CouponCode") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CouponRuleName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("CustomerId") + .HasColumnType("bigint"); + + b.Property("DiscountAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("IsMasterOrder") + .HasColumnType("bit"); + + b.Property("LatestUpdatedById") + .HasColumnType("bigint"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("OrderNote") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OrderStatus") + .HasColumnType("int"); + + b.Property("OrderTotal") + .HasColumnType("decimal(18,2)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PaymentFeeAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentMethod") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ShippingAddressId") + .HasColumnType("bigint"); + + b.Property("ShippingFeeAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("ShippingMethod") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("SubTotal") + .HasColumnType("decimal(18,2)"); + + b.Property("SubTotalWithDiscount") + .HasColumnType("decimal(18,2)"); + + b.Property("TaxAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("VendorId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("BillingAddressId"); + + b.HasIndex("CreatedById"); + + b.HasIndex("CustomerId"); + + b.HasIndex("LatestUpdatedById"); + + b.HasIndex("ParentId"); + + b.HasIndex("ShippingAddressId"); + + b.ToTable("Orders_Order", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderAddress", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AddressLine1") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("AddressLine2") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("City") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ContactName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CountryId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("DistrictId") + .HasColumnType("bigint"); + + b.Property("Phone") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("StateOrProvinceId") + .HasColumnType("bigint"); + + b.Property("ZipCode") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("DistrictId"); + + b.HasIndex("StateOrProvinceId"); + + b.ToTable("Orders_OrderAddress", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("NewStatus") + .HasColumnType("int"); + + b.Property("Note") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OldStatus") + .HasColumnType("int"); + + b.Property("OrderId") + .HasColumnType("bigint"); + + b.Property("OrderSnapshot") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("OrderId"); + + b.ToTable("Orders_OrderHistory", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DiscountAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("OrderId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("ProductPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("TaxAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("TaxPercent") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.HasIndex("ProductId"); + + b.ToTable("Orders_OrderItem", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Payments.Models.Payment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("decimal(18,2)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("FailureMessage") + .HasColumnType("nvarchar(max)"); + + b.Property("GatewayTransactionId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("OrderId") + .HasColumnType("bigint"); + + b.Property("PaymentFee") + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentMethod") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Status") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.ToTable("Payments_Payment", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Payments.Models.PaymentProvider", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AdditionalSettings") + .HasColumnType("nvarchar(max)"); + + b.Property("ConfigureUrl") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("LandingViewComponentName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Payments_PaymentProvider", (string)null); + + b.HasData( + new + { + Id = "Braintree", + AdditionalSettings = "{\"PublicKey\": \"6j4d7qspt5n48kx4\", \"PrivateKey\" : \"bd1c26e53a6d811243fcc3eb268113e1\", \"MerchantId\" : \"ncsh7wwqvzs3cx9q\", \"IsProduction\" : \"false\"}", + ConfigureUrl = "payments-braintree-config", + IsEnabled = true, + LandingViewComponentName = "BraintreeLanding", + Name = "Braintree" + }, + new + { + Id = "CoD", + ConfigureUrl = "payments-cod-config", + IsEnabled = true, + LandingViewComponentName = "CoDLanding", + Name = "Cash On Delivery" + }, + new + { + Id = "PaypalExpress", + AdditionalSettings = "{ \"IsSandbox\":true, \"ClientId\":\"\", \"ClientSecret\":\"\" }", + ConfigureUrl = "payments-paypalExpress-config", + IsEnabled = true, + LandingViewComponentName = "PaypalExpressLanding", + Name = "Paypal Express" + }, + new + { + Id = "Stripe", + AdditionalSettings = "{\"PublicKey\": \"pk_test_6pRNASCoBOKtIshFeQd4XMUh\", \"PrivateKey\" : \"sk_test_BQokikJOvBiI2HlWgH4olfQ2\"}", + ConfigureUrl = "payments-stripe-config", + IsEnabled = true, + LandingViewComponentName = "StripeLanding", + Name = "Stripe" + }, + new + { + Id = "MomoPayment", + AdditionalSettings = "{\"IsSandbox\":true,\"PartnerCode\":\"MOMOIQA420180417\",\"AccessKey\":\"SvDmj2cOTYZmQQ3H\",\"SecretKey\":\"PPuDXq1KowPT1ftR8DvlQTHhC03aul17\",\"PaymentFee\":0.0}", + ConfigureUrl = "payments-momo-config", + IsEnabled = true, + LandingViewComponentName = "MomoLanding", + Name = "Momo Payment" + }, + new + { + Id = "NganLuong", + AdditionalSettings = "{\"IsSandbox\":true, \"MerchantId\": 47249, \"MerchantPassword\": \"e530745693dbde678f9da98a7c821a07\", \"ReceiverEmail\": \"nlqthien@gmail.com\"}", + ConfigureUrl = "payments-nganluong-config", + IsEnabled = true, + LandingViewComponentName = "NganLuongLanding", + Name = "Ngan Luong Payment" + }, + new + { + Id = "Cashfree", + AdditionalSettings = "{ \"IsSandbox\":true, \"AppId\":\"358035b02486f36ca27904540853\", \"SecretKey\":\"26f48dcd6a27f89f59f28e65849e587916dd57b9\" }", + ConfigureUrl = "payments-cashfree-config", + IsEnabled = true, + LandingViewComponentName = "CashfreeLanding", + Name = "Cashfree Payment Gateway" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DiscountAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("DiscountStep") + .HasColumnType("int"); + + b.Property("EndOn") + .HasColumnType("datetimeoffset"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsCouponRequired") + .HasColumnType("bit"); + + b.Property("MaxDiscountAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("RuleToApply") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("StartOn") + .HasColumnType("datetimeoffset"); + + b.Property("UsageLimitPerCoupon") + .HasColumnType("int"); + + b.Property("UsageLimitPerCustomer") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Pricing_CartRule", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCategory", b => + { + b.Property("CartRuleId") + .HasColumnType("bigint"); + + b.Property("CategoryId") + .HasColumnType("bigint"); + + b.HasKey("CartRuleId", "CategoryId"); + + b.HasIndex("CategoryId"); + + b.ToTable("Pricing_CartRuleCategory", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCustomerGroup", b => + { + b.Property("CartRuleId") + .HasColumnType("bigint"); + + b.Property("CustomerGroupId") + .HasColumnType("bigint"); + + b.HasKey("CartRuleId", "CustomerGroupId"); + + b.HasIndex("CustomerGroupId"); + + b.ToTable("Pricing_CartRuleCustomerGroup", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleProduct", b => + { + b.Property("CartRuleId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.HasKey("CartRuleId", "ProductId"); + + b.HasIndex("ProductId"); + + b.ToTable("Pricing_CartRuleProduct", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleUsage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CartRuleId") + .HasColumnType("bigint"); + + b.Property("CouponId") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("OrderId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("CartRuleId"); + + b.HasIndex("CouponId"); + + b.HasIndex("UserId"); + + b.ToTable("Pricing_CartRuleUsage", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DiscountAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("EndOn") + .HasColumnType("datetimeoffset"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("MaxDiscountAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("RuleToApply") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("StartOn") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + b.ToTable("Pricing_CatalogRule", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRuleCustomerGroup", b => + { + b.Property("CatalogRuleId") + .HasColumnType("bigint"); + + b.Property("CustomerGroupId") + .HasColumnType("bigint"); + + b.HasKey("CatalogRuleId", "CustomerGroupId"); + + b.HasIndex("CustomerGroupId"); + + b.ToTable("Pricing_CatalogRuleCustomerGroup", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.Coupon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CartRuleId") + .HasColumnType("bigint"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + b.HasIndex("CartRuleId"); + + b.ToTable("Pricing_Coupon", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.ProductComparison.Models.ComparingProduct", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.HasIndex("UserId"); + + b.ToTable("ProductComparison_ComparingProduct", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.ProductRecentlyViewed.Models.RecentlyViewedProduct", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("LatestViewedOn") + .HasColumnType("datetimeoffset"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.ToTable("ProductRecentlyViewed_RecentlyViewedProduct", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Reply", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("ReplierName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ReviewId") + .HasColumnType("bigint"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ReviewId"); + + b.HasIndex("UserId"); + + b.ToTable("Reviews_Reply", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Review", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Comment") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("EntityId") + .HasColumnType("bigint"); + + b.Property("EntityTypeId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Rating") + .HasColumnType("int"); + + b.Property("ReviewerName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Title") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Reviews_Review", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Search.Models.Query", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("QueryText") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ResultsCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Search_Query", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.Shipment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedById") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("OrderId") + .HasColumnType("bigint"); + + b.Property("TrackingNumber") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("VendorId") + .HasColumnType("bigint"); + + b.Property("WarehouseId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("OrderId"); + + b.HasIndex("WarehouseId"); + + b.ToTable("Shipments_Shipment", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.ShipmentItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("OrderItemId") + .HasColumnType("bigint"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("ShipmentId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.HasIndex("ShipmentId"); + + b.ToTable("Shipments_ShipmentItem", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Shipping.Models.ShippingProvider", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AdditionalSettings") + .HasColumnType("nvarchar(max)"); + + b.Property("ConfigureUrl") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("OnlyCountryIdsString") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("OnlyStateOrProvinceIdsString") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ShippingPriceServiceTypeName") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ToAllShippingEnabledCountries") + .HasColumnType("bit"); + + b.Property("ToAllShippingEnabledStatesOrProvinces") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("Shipping_ShippingProvider", (string)null); + + b.HasData( + new + { + Id = "FreeShip", + AdditionalSettings = "{MinimumOrderAmount : 1}", + ConfigureUrl = "", + IsEnabled = true, + Name = "Free Ship", + ShippingPriceServiceTypeName = "SimplCommerce.Module.ShippingFree.Services.FreeShippingServiceProvider,SimplCommerce.Module.ShippingFree", + ToAllShippingEnabledCountries = true, + ToAllShippingEnabledStatesOrProvinces = true + }, + new + { + Id = "TableRate", + ConfigureUrl = "shipping-table-rate-config", + IsEnabled = true, + Name = "Table Rate", + ShippingPriceServiceTypeName = "SimplCommerce.Module.ShippingTableRate.Services.TableRateShippingServiceProvider,SimplCommerce.Module.ShippingTableRate", + ToAllShippingEnabledCountries = true, + ToAllShippingEnabledStatesOrProvinces = true + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.ShippingTableRate.Models.PriceAndDestination", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CountryId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("DistrictId") + .HasColumnType("bigint"); + + b.Property("MinOrderSubtotal") + .HasColumnType("decimal(18,2)"); + + b.Property("Note") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("StateOrProvinceId") + .HasColumnType("bigint"); + + b.Property("ZipCode") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("DistrictId"); + + b.HasIndex("StateOrProvinceId"); + + b.ToTable("ShippingTableRate_PriceAndDestination", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.ShoppingCart.Models.CartItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("CustomerId") + .HasColumnType("bigint"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("VendorId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("CustomerId"); + + b.HasIndex("ProductId"); + + b.ToTable("ShoppingCart_CartItem", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.Tax.Models.TaxClass", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.ToTable("Tax_TaxClass", (string)null); + + b.HasData( + new + { + Id = 1L, + Name = "Standard VAT" + }); + }); + + modelBuilder.Entity("SimplCommerce.Module.Tax.Models.TaxRate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CountryId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Rate") + .HasColumnType("decimal(18,2)"); + + b.Property("StateOrProvinceId") + .HasColumnType("bigint"); + + b.Property("TaxClassId") + .HasColumnType("bigint"); + + b.Property("ZipCode") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("StateOrProvinceId"); + + b.HasIndex("TaxClassId"); + + b.ToTable("Tax_TaxRate", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishList", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("SharingCode") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("WishList_WishList", (string)null); + }); + + modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishListItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LatestUpdatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("ProductId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("WishListId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.HasIndex("WishListId"); + + b.ToTable("WishList_WishListItem", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Role", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.LocalizedContentProperty", b => + { + b.HasOne("SimplCommerce.Infrastructure.Localization.Culture", "Culture") + .WithMany() + .HasForeignKey("CultureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Culture"); + }); + + modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Resource", b => + { + b.HasOne("SimplCommerce.Infrastructure.Localization.Culture", "Culture") + .WithMany("Resources") + .HasForeignKey("CultureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Culture"); + }); + + modelBuilder.Entity("SimplCommerce.Module.ActivityLog.Models.Activity", b => + { + b.HasOne("SimplCommerce.Module.ActivityLog.Models.ActivityType", "ActivityType") + .WithMany() + .HasForeignKey("ActivityTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ActivityType"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Category", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Category", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.Media", "ThumbnailImage") + .WithMany() + .HasForeignKey("ThumbnailImageId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Parent"); + + b.Navigation("ThumbnailImage"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Product", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Brand", "Brand") + .WithMany() + .HasForeignKey("BrandId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") + .WithMany() + .HasForeignKey("LatestUpdatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Tax.Models.TaxClass", "TaxClass") + .WithMany() + .HasForeignKey("TaxClassId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.Media", "ThumbnailImage") + .WithMany() + .HasForeignKey("ThumbnailImageId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Brand"); + + b.Navigation("CreatedBy"); + + b.Navigation("LatestUpdatedBy"); + + b.Navigation("TaxClass"); + + b.Navigation("ThumbnailImage"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttribute", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.ProductAttributeGroup", "Group") + .WithMany("Attributes") + .HasForeignKey("GroupId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Group"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeValue", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.ProductAttribute", "Attribute") + .WithMany() + .HasForeignKey("AttributeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany("AttributeValues") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Attribute"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductCategory", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Category", "Category") + .WithMany() + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany("Categories") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductLink", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "LinkedProduct") + .WithMany("LinkedProductLinks") + .HasForeignKey("LinkedProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany("ProductLinks") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("LinkedProduct"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductMedia", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Media", "Media") + .WithMany() + .HasForeignKey("MediaId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany("Medias") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Media"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionCombination", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.ProductOption", "Option") + .WithMany() + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany("OptionCombinations") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionValue", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.ProductOption", "Option") + .WithMany() + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany("OptionValues") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductPriceHistory", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany("PriceHistories") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CreatedBy"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplateProductAttribute", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.ProductAttribute", "ProductAttribute") + .WithMany("ProductTemplates") + .HasForeignKey("ProductAttributeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.ProductTemplate", "ProductTemplate") + .WithMany("ProductAttributes") + .HasForeignKey("ProductTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProductAttribute"); + + b.Navigation("ProductTemplate"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.Checkout", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "Customer") + .WithMany() + .HasForeignKey("CustomerId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CreatedBy"); + + b.Navigation("Customer"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.CheckoutItem", b => + { + b.HasOne("SimplCommerce.Module.Checkouts.Models.Checkout", "Checkout") + .WithMany("CheckoutItems") + .HasForeignKey("CheckoutId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Checkout"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Cms.Models.MenuItem", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Entity", "Entity") + .WithMany() + .HasForeignKey("EntityId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Cms.Models.Menu", "Menu") + .WithMany("MenuItems") + .HasForeignKey("MenuId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Cms.Models.MenuItem", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Entity"); + + b.Navigation("Menu"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Page", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") + .WithMany() + .HasForeignKey("LatestUpdatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CreatedBy"); + + b.Navigation("LatestUpdatedBy"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Comments.Models.Comment", b => + { + b.HasOne("SimplCommerce.Module.Comments.Models.Comment", "Parent") + .WithMany("Replies") + .HasForeignKey("ParentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Parent"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Contacts.Models.Contact", b => + { + b.HasOne("SimplCommerce.Module.Contacts.Models.ContactArea", "ContactArea") + .WithMany() + .HasForeignKey("ContactAreaId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ContactArea"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Address", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") + .WithMany() + .HasForeignKey("CountryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.District", "District") + .WithMany() + .HasForeignKey("DistrictId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") + .WithMany() + .HasForeignKey("StateOrProvinceId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Country"); + + b.Navigation("District"); + + b.Navigation("StateOrProvince"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroupUser", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.CustomerGroup", "CustomerGroup") + .WithMany("Users") + .HasForeignKey("CustomerGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany("CustomerGroups") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CustomerGroup"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.District", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") + .WithMany() + .HasForeignKey("StateOrProvinceId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("StateOrProvince"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Entity", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.EntityType", "EntityType") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("EntityType"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.StateOrProvince", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") + .WithMany("StatesOrProvinces") + .HasForeignKey("CountryId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Country"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.User", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.UserAddress", "DefaultBillingAddress") + .WithMany() + .HasForeignKey("DefaultBillingAddressId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.UserAddress", "DefaultShippingAddress") + .WithMany() + .HasForeignKey("DefaultShippingAddressId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.Vendor", null) + .WithMany("Users") + .HasForeignKey("VendorId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("DefaultBillingAddress"); + + b.Navigation("DefaultShippingAddress"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserAddress", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Address", "Address") + .WithMany("UserAddresses") + .HasForeignKey("AddressId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany("UserAddresses") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Address"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserRole", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Role", "Role") + .WithMany("Users") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Role"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.WidgetInstance", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Widget", "Widget") + .WithMany() + .HasForeignKey("WidgetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.WidgetZone", "WidgetZone") + .WithMany() + .HasForeignKey("WidgetZoneId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Widget"); + + b.Navigation("WidgetZone"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Stock", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Inventory.Models.Warehouse", "Warehouse") + .WithMany() + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Warehouse"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.StockHistory", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Inventory.Models.Warehouse", "Warehouse") + .WithMany() + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CreatedBy"); + + b.Navigation("Product"); + + b.Navigation("Warehouse"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Warehouse", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Address", "Address") + .WithMany() + .HasForeignKey("AddressId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.Vendor", "Vendor") + .WithMany() + .HasForeignKey("VendorId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Address"); + + b.Navigation("Vendor"); + }); + + modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItem", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") + .WithMany() + .HasForeignKey("LatestUpdatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.Media", "ThumbnailImage") + .WithMany() + .HasForeignKey("ThumbnailImageId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CreatedBy"); + + b.Navigation("LatestUpdatedBy"); + + b.Navigation("ThumbnailImage"); + }); + + modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItemCategory", b => + { + b.HasOne("SimplCommerce.Module.News.Models.NewsCategory", "Category") + .WithMany("NewsItems") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.News.Models.NewsItem", "NewsItem") + .WithMany("Categories") + .HasForeignKey("NewsItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("NewsItem"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.Order", b => + { + b.HasOne("SimplCommerce.Module.Orders.Models.OrderAddress", "BillingAddress") + .WithMany() + .HasForeignKey("BillingAddressId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "Customer") + .WithMany() + .HasForeignKey("CustomerId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") + .WithMany() + .HasForeignKey("LatestUpdatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Orders.Models.OrderAddress", "ShippingAddress") + .WithMany() + .HasForeignKey("ShippingAddressId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("BillingAddress"); + + b.Navigation("CreatedBy"); + + b.Navigation("Customer"); + + b.Navigation("LatestUpdatedBy"); + + b.Navigation("Parent"); + + b.Navigation("ShippingAddress"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderAddress", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") + .WithMany() + .HasForeignKey("CountryId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.District", "District") + .WithMany() + .HasForeignKey("DistrictId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") + .WithMany() + .HasForeignKey("StateOrProvinceId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Country"); + + b.Navigation("District"); + + b.Navigation("StateOrProvince"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderHistory", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") + .WithMany() + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CreatedBy"); + + b.Navigation("Order"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderItem", b => + { + b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") + .WithMany("OrderItems") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Order"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Payments.Models.Payment", b => + { + b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") + .WithMany() + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Order"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCategory", b => + { + b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") + .WithMany("Categories") + .HasForeignKey("CartRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Category", "Category") + .WithMany() + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CartRule"); + + b.Navigation("Category"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCustomerGroup", b => + { + b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") + .WithMany("CustomerGroups") + .HasForeignKey("CartRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.CustomerGroup", "CustomerGroup") + .WithMany() + .HasForeignKey("CustomerGroupId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CartRule"); + + b.Navigation("CustomerGroup"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleProduct", b => + { + b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") + .WithMany("Products") + .HasForeignKey("CartRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CartRule"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleUsage", b => + { + b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") + .WithMany() + .HasForeignKey("CartRuleId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Pricing.Models.Coupon", "Coupon") + .WithMany() + .HasForeignKey("CouponId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CartRule"); + + b.Navigation("Coupon"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRuleCustomerGroup", b => + { + b.HasOne("SimplCommerce.Module.Pricing.Models.CatalogRule", "CatalogRule") + .WithMany("CustomerGroups") + .HasForeignKey("CatalogRuleId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.CustomerGroup", "CustomerGroup") + .WithMany() + .HasForeignKey("CustomerGroupId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CatalogRule"); + + b.Navigation("CustomerGroup"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.Coupon", b => + { + b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") + .WithMany("Coupons") + .HasForeignKey("CartRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CartRule"); + }); + + modelBuilder.Entity("SimplCommerce.Module.ProductComparison.Models.ComparingProduct", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Reply", b => + { + b.HasOne("SimplCommerce.Module.Reviews.Models.Review", "Review") + .WithMany("Replies") + .HasForeignKey("ReviewId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Review"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Review", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.Shipment", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") + .WithMany() + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Inventory.Models.Warehouse", "Warehouse") + .WithMany() + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CreatedBy"); + + b.Navigation("Order"); + + b.Navigation("Warehouse"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.ShipmentItem", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Shipments.Models.Shipment", "Shipment") + .WithMany("Items") + .HasForeignKey("ShipmentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Shipment"); + }); + + modelBuilder.Entity("SimplCommerce.Module.ShippingTableRate.Models.PriceAndDestination", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") + .WithMany() + .HasForeignKey("CountryId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.District", "District") + .WithMany() + .HasForeignKey("DistrictId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") + .WithMany() + .HasForeignKey("StateOrProvinceId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Country"); + + b.Navigation("District"); + + b.Navigation("StateOrProvince"); + }); + + modelBuilder.Entity("SimplCommerce.Module.ShoppingCart.Models.CartItem", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "Customer") + .WithMany() + .HasForeignKey("CustomerId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Customer"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Tax.Models.TaxRate", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") + .WithMany() + .HasForeignKey("CountryId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") + .WithMany() + .HasForeignKey("StateOrProvinceId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("SimplCommerce.Module.Tax.Models.TaxClass", "TaxClass") + .WithMany() + .HasForeignKey("TaxClassId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Country"); + + b.Navigation("StateOrProvince"); + + b.Navigation("TaxClass"); + }); + + modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishList", b => + { + b.HasOne("SimplCommerce.Module.Core.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishListItem", b => + { + b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("SimplCommerce.Module.WishList.Models.WishList", "WishList") + .WithMany("Items") + .HasForeignKey("WishListId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("WishList"); + }); + + modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Culture", b => + { + b.Navigation("Resources"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Category", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Product", b => + { + b.Navigation("AttributeValues"); + + b.Navigation("Categories"); + + b.Navigation("LinkedProductLinks"); + + b.Navigation("Medias"); + + b.Navigation("OptionCombinations"); + + b.Navigation("OptionValues"); + + b.Navigation("PriceHistories"); + + b.Navigation("ProductLinks"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttribute", b => + { + b.Navigation("ProductTemplates"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeGroup", b => + { + b.Navigation("Attributes"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplate", b => + { + b.Navigation("ProductAttributes"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.Checkout", b => + { + b.Navigation("CheckoutItems"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Menu", b => + { + b.Navigation("MenuItems"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Cms.Models.MenuItem", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Comments.Models.Comment", b => + { + b.Navigation("Replies"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Address", b => + { + b.Navigation("UserAddresses"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Country", b => + { + b.Navigation("StatesOrProvinces"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroup", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Role", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.User", b => + { + b.Navigation("CustomerGroups"); + + b.Navigation("Roles"); + + b.Navigation("UserAddresses"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Core.Models.Vendor", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsCategory", b => + { + b.Navigation("NewsItems"); + }); + + modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItem", b => + { + b.Navigation("Categories"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Orders.Models.Order", b => + { + b.Navigation("Children"); + + b.Navigation("OrderItems"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRule", b => + { + b.Navigation("Categories"); + + b.Navigation("Coupons"); + + b.Navigation("CustomerGroups"); + + b.Navigation("Products"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRule", b => + { + b.Navigation("CustomerGroups"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Review", b => + { + b.Navigation("Replies"); + }); + + modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.Shipment", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishList", b => + { + b.Navigation("Items"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs b/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs new file mode 100644 index 000000000..838dab06a --- /dev/null +++ b/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace SimplCommerce.WebHost.Migrations +{ + /// + public partial class waqar : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml b/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml index 67124e495..5b89ad902 100644 --- a/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml +++ b/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml @@ -51,6 +51,10 @@ + + + + diff --git a/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml b/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml index 39f682f97..4904d7df1 100644 --- a/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml +++ b/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml @@ -18,9 +18,19 @@ + } else { + // + } diff --git a/src/SimplCommerce.WebHost/appsettings.json b/src/SimplCommerce.WebHost/appsettings.json index 150c72a1d..adb7c9a45 100644 --- a/src/SimplCommerce.WebHost/appsettings.json +++ b/src/SimplCommerce.WebHost/appsettings.json @@ -1,7 +1,7 @@ { - "ConnectionStrings": { - "DefaultConnection": "Server=.;Database=SimplCommerce;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true" - }, + "ConnectionStrings": { + "DefaultConnection": "Server=DESKTOP-8IDJ6GC\\SQLEXPRESS;Database=SimplCommerce1;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true" + }, "Authentication" : { "Facebook" : { "AppId" : "1716532045292977", diff --git a/src/SimplCommerce.WebHost/tempkey.jwk b/src/SimplCommerce.WebHost/tempkey.jwk new file mode 100644 index 000000000..be1a2dde8 --- /dev/null +++ b/src/SimplCommerce.WebHost/tempkey.jwk @@ -0,0 +1 @@ +{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"RLRLUJre8czi5fIc8noc_KCxdHIJDn5Y21E4VZACAYUaLVoYMkYDqNOHABxgaPAWUx4tUEc6jay5s92ModhnMNDmxd1aYt_4rEMWAoeQpLuzIXaKziqDm5YnQuBwj7MLkGfCfbv_sVtTo9QRss-KxGiNwp7bp3GC7kkC2iz_F8xYj6NUR_WtrKCvqwX5R3D7sKneZ47zfFG1nHhnqg2wv3skCIuC4_67yv32U9OtCWtdgeQNci3BoF6lZtz_fYXjKaXp3A1LWAuvCqQa4pArhk0a1LccrCcQtbW-JBuAk1j3bpQzdcH0H1FL0Bl-vbja6quW9cr9WaIzI-czUup_rQ","DP":"RaIWsXvyDqNyKrRttG9xODemYNFjr2HobOVQjkouecVI0vZDFGYtjam3kuVgdYGaTQPaJlfZyVYJVAUcXoL7kJYs-kNOkhou53iBzX4_kXNq37-asdteAb72ojNMK9XSar3qP0BMcnzQoSCouAlh_JLR-7x3uOzx_VD3l8XFTms","DQ":"TM1RZcRqUvcO88GyG37IjLFufKTVtKhNDsI8LiplJ0iA4bh9UBf4XZw1JSbXmHkM5mxx2kYhn62p2Laa4awsW_c0mN0MvoYCGIGRhUlOZr7en4iPm9B9q-ktXdJ69O9sDPhghOvLzAegW28I2HJItT6LkdpXrOG_nYtG2TsQs40","E":"AQAB","K":null,"KeyId":"0AD55BF91BD1B5683FB6C6497CDAFCD8","Kid":"0AD55BF91BD1B5683FB6C6497CDAFCD8","Kty":"RSA","N":"z4tSgQvmnUqYgy4i9Vtud9YoiNOFJSapKQF4i7cqZEP20zLjS4izoPooL7Yvhan4OeuLQbJdudQ2_qhkJp8leq9py640p3IQl-7wwwBC-uUJFn-nso-ILzh5CFDAk67_Fb1FIUUU_AkS-eVfrDARaoilPJ-oGAnYd77IhNGI8qeYxPbaTTqLm3cGUdFhNxHeUdZirDHDCb8riW2swuEKrFVkfaMQTRh2RQeszRAK_3yZ-oW-rLRMSxsdZ4dPy_Ewa6TvgPeU-3wK9jpmYO2bNE_s8EkSLu8Vp1eY6xOB1hbuwJNLDtdRNcyPXu2HhBvlJH1cRLobDNGPKOtRu_EZ6Q","Oth":null,"P":"2v2iEPXu6CyHjP-TN7may3gdStj6UlnyJxx08fFwlptiOAgI4K1ilRorUr-02nJRk-WaL-kBNMj16jyqms2laFrgZZ9H5RTPbzr4P5YFYIIS7sU_d9y3f1Fdr1BCnw_J9FVqQ6uspV30Wnrk0pW5x8VPjMzNnPgjA7Wdgrzgqgc","Q":"8p54INiWiXtMK71wFYgO8wS0IuNs7clhfzbAKMC893Tom0zQsll-TeU7a5PdJOdctteNxIW2R7WvLe8dP6L7yBIryD6oAzFkJ9QYd8eUM2X3vMNaG_zb_2S7jTB0lBso2W5o2raWZPsxOVKnqnNEbijtt6nWlAuBuy4U1fH04I8","QI":"ozeVgsQSv3ny7U9JmOLgQ5tPFLGqv4wv0lSyXGJuFftpzZEbGO1Y-JIVogB6WI-Ojff1YqqtxEdOHjfHNuZWLmV7z8gS1ByrUWLWDHfP1NaA50OvLJR-5wTXl6y9endMUxrDGr7QdZwyhscv_hfuu9JLkms377szloAbj-BmwEs","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true,"SignatureProviderObjectPoolCacheSize":32}} \ No newline at end of file From bb4d8c0b38e34ad391e16815057d89c2b194417d Mon Sep 17 00:00:00 2001 From: DELL Date: Sat, 24 May 2025 15:43:57 +0530 Subject: [PATCH 3/4] Cleaned up unnecessary changes as per review on Product Feed endpoint (#1133) --- .../Areas/Catalog/Views/Feed/Index.cshtml | 92 +- .../Areas/Core/Controllers/HomeController.cs | 34 - .../20250523054111_waqar.Designer.cs | 4767 ----------------- .../Migrations/20250523054111_waqar.cs | 22 - src/SimplCommerce.WebHost/Program.cs | 1 - .../Views/Shared/_Layout.cshtml | 7 +- src/SimplCommerce.WebHost/appsettings.json | 2 +- 7 files changed, 3 insertions(+), 4922 deletions(-) delete mode 100644 src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs delete mode 100644 src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs diff --git a/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml b/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml index 8be57cd0d..9ffbf6293 100644 --- a/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml +++ b/src/Modules/SimplCommerce.Module.Catalog/Areas/Catalog/Views/Feed/Index.cshtml @@ -1,8 +1,5 @@ - -@model List - +@model List @using System.Text.RegularExpressions - @@ -15,7 +12,6 @@ margin: 0; padding: 0; } - h1 { text-align: center; margin-top: 30px; @@ -92,89 +88,3 @@ - - - - - - - - - - - - - -@* most importanty *@ -@* @model List -@using System.Text.RegularExpressions - - -@{ - ViewData["Title"] = "Feed"; -} - -

Product Feed

- -@foreach (var product in Model) -{ -
- @product.Name - -

@product.Name

-

@Html.Raw(Regex.Replace(product.Description, "<.*?>", string.Empty))

- Price: ₹@product.Price.ToString("F2") -
-} - - - *@ - - - - -@* @model IEnumerable - -

Product Feed

- -@* @foreach (var product in Model) -{ -
-

@product.Name

- - @if (!string.IsNullOrEmpty(product.ThumbnailImage)) - { - @product.Name - } - else - { -

No Image Available

- } - -

@Html.Raw(product.ShortDescription)

- Price: @product.Price.ToString("C") -
-} - *@ - - -@* @foreach (var product in Model) -{ -
-

@product.Name

- @product.Name -

@Html.Raw(product.ShortDescription)

- Price: @product.Price.ToString("C") -
-} *@ - - -@* @foreach (var product in Model) -{ -
-

@product.Name

- @product.Name -

@product.ShortDescription

- Price: @product.Price.ToString("C") -
-} *@ diff --git a/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs b/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs index 99a8eb70f..b4a6e1f06 100644 --- a/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs +++ b/src/Modules/SimplCommerce.Module.Core/Areas/Core/Controllers/HomeController.cs @@ -30,40 +30,6 @@ public IActionResult TestError() throw new Exception("Test behavior in case of error"); } - /// - /// - /// - /// - - //[HttpGet("/feed")] - //public IActionResult Feed() - //{ - // var products = _productRepository.Query() - // .Where(p => p.IsPublished && !p.IsDeleted) - // .OrderByDescending(p => p.CreatedOn) - // .Select(p => new ProductFeedViewModel - // { - // Id = p.Id, - // Name = p.Name, - // ThumbnailImage = p.ThumbnailImage, - // ShortDescription = p.ShortDescription, - // Price = p.Price - // }).ToList(); - - // return View(products); - //} - - - - - - - - - - /// - /// - [HttpGet("/")] public IActionResult Index() { diff --git a/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs b/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs deleted file mode 100644 index 019fa19b8..000000000 --- a/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.Designer.cs +++ /dev/null @@ -1,4767 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using SimplCommerce.Module.Core.Data; - -#nullable disable - -namespace SimplCommerce.WebHost.Migrations -{ - [DbContext(typeof(SimplDbContext))] - [Migration("20250523054111_waqar")] - partial class waqar - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("Core_RoleClaim", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Core_UserClaim", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("Core_UserLogin", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("bigint"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("Core_UserToken", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Culture", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Localization_Culture", (string)null); - - b.HasData( - new - { - Id = "en-US", - Name = "English (US)" - }); - }); - - modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.LocalizedContentProperty", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CultureId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("EntityId") - .HasColumnType("bigint"); - - b.Property("EntityType") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ProperyName") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CultureId"); - - b.ToTable("Localization_LocalizedContentProperty", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CultureId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CultureId"); - - b.ToTable("Localization_Resource", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.ActivityLog.Models.Activity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ActivityTypeId") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("EntityId") - .HasColumnType("bigint"); - - b.Property("EntityTypeId") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ActivityTypeId"); - - b.ToTable("ActivityLog_Activity", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.ActivityLog.Models.ActivityType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("ActivityLog_ActivityType", (string)null); - - b.HasData( - new - { - Id = 1L, - Name = "EntityView" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Brand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Catalog_Brand", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Category", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayOrder") - .HasColumnType("int"); - - b.Property("IncludeInMenu") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("MetaDescription") - .HasColumnType("nvarchar(max)"); - - b.Property("MetaKeywords") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("MetaTitle") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ThumbnailImageId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("ThumbnailImageId"); - - b.ToTable("Catalog_Category", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("BrandId") - .HasColumnType("bigint"); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayOrder") - .HasColumnType("int"); - - b.Property("Gtin") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("HasOptions") - .HasColumnType("bit"); - - b.Property("IsAllowToOrder") - .HasColumnType("bit"); - - b.Property("IsCallForPricing") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsFeatured") - .HasColumnType("bit"); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("IsVisibleIndividually") - .HasColumnType("bit"); - - b.Property("LatestUpdatedById") - .HasColumnType("bigint"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("MetaDescription") - .HasColumnType("nvarchar(max)"); - - b.Property("MetaKeywords") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("MetaTitle") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("NormalizedName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("OldPrice") - .HasColumnType("decimal(18,2)"); - - b.Property("Price") - .HasColumnType("decimal(18,2)"); - - b.Property("PublishedOn") - .HasColumnType("datetimeoffset"); - - b.Property("RatingAverage") - .HasColumnType("float"); - - b.Property("ReviewsCount") - .HasColumnType("int"); - - b.Property("ShortDescription") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Sku") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("SpecialPrice") - .HasColumnType("decimal(18,2)"); - - b.Property("SpecialPriceEnd") - .HasColumnType("datetimeoffset"); - - b.Property("SpecialPriceStart") - .HasColumnType("datetimeoffset"); - - b.Property("Specification") - .HasColumnType("nvarchar(max)"); - - b.Property("StockQuantity") - .HasColumnType("int"); - - b.Property("StockTrackingIsEnabled") - .HasColumnType("bit"); - - b.Property("TaxClassId") - .HasColumnType("bigint"); - - b.Property("ThumbnailImageId") - .HasColumnType("bigint"); - - b.Property("VendorId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("BrandId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("LatestUpdatedById"); - - b.HasIndex("TaxClassId"); - - b.HasIndex("ThumbnailImageId"); - - b.ToTable("Catalog_Product", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttribute", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("GroupId"); - - b.ToTable("Catalog_ProductAttribute", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Catalog_ProductAttributeGroup", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AttributeId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("AttributeId"); - - b.HasIndex("ProductId"); - - b.ToTable("Catalog_ProductAttributeValue", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("DisplayOrder") - .HasColumnType("int"); - - b.Property("IsFeaturedProduct") - .HasColumnType("bit"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CategoryId"); - - b.HasIndex("ProductId"); - - b.ToTable("Catalog_ProductCategory", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductLink", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("LinkType") - .HasColumnType("int"); - - b.Property("LinkedProductId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("LinkedProductId"); - - b.HasIndex("ProductId"); - - b.ToTable("Catalog_ProductLink", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductMedia", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("DisplayOrder") - .HasColumnType("int"); - - b.Property("MediaId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("MediaId"); - - b.HasIndex("ProductId"); - - b.ToTable("Catalog_ProductMedia", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOption", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Catalog_ProductOption", (string)null); - - b.HasData( - new - { - Id = 1L, - Name = "Color" - }, - new - { - Id = 2L, - Name = "Size" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionCombination", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("OptionId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("SortIndex") - .HasColumnType("int"); - - b.Property("Value") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("OptionId"); - - b.HasIndex("ProductId"); - - b.ToTable("Catalog_ProductOptionCombination", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("DisplayType") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("OptionId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("SortIndex") - .HasColumnType("int"); - - b.Property("Value") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("OptionId"); - - b.HasIndex("ProductId"); - - b.ToTable("Catalog_ProductOptionValue", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductPriceHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("OldPrice") - .HasColumnType("decimal(18,2)"); - - b.Property("Price") - .HasColumnType("decimal(18,2)"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("SpecialPrice") - .HasColumnType("decimal(18,2)"); - - b.Property("SpecialPriceEnd") - .HasColumnType("datetimeoffset"); - - b.Property("SpecialPriceStart") - .HasColumnType("datetimeoffset"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("ProductId"); - - b.ToTable("Catalog_ProductPriceHistory", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Catalog_ProductTemplate", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplateProductAttribute", b => - { - b.Property("ProductTemplateId") - .HasColumnType("bigint"); - - b.Property("ProductAttributeId") - .HasColumnType("bigint"); - - b.HasKey("ProductTemplateId", "ProductAttributeId"); - - b.HasIndex("ProductAttributeId"); - - b.ToTable("Catalog_ProductTemplateProductAttribute", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.Checkout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CouponCode") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CouponRuleName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("CustomerId") - .HasColumnType("bigint"); - - b.Property("IsProductPriceIncludeTax") - .HasColumnType("bit"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("OrderNote") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("ShippingAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("ShippingData") - .HasColumnType("nvarchar(max)"); - - b.Property("ShippingMethod") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("TaxAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("VendorId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("CustomerId"); - - b.ToTable("Checkouts_Checkout", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.CheckoutItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CheckoutId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("CheckoutId"); - - b.HasIndex("ProductId"); - - b.ToTable("Checkouts_CheckoutItem", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("IsSystem") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Cms_Menu", (string)null); - - b.HasData( - new - { - Id = 1L, - IsPublished = true, - IsSystem = true, - Name = "Customer Services" - }, - new - { - Id = 2L, - IsPublished = true, - IsSystem = true, - Name = "Information" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Cms.Models.MenuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomLink") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("DisplayOrder") - .HasColumnType("int"); - - b.Property("EntityId") - .HasColumnType("bigint"); - - b.Property("MenuId") - .HasColumnType("bigint"); - - b.Property("Name") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("EntityId"); - - b.HasIndex("MenuId"); - - b.HasIndex("ParentId"); - - b.ToTable("Cms_MenuItem", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Page", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Body") - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("LatestUpdatedById") - .HasColumnType("bigint"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("MetaDescription") - .HasColumnType("nvarchar(max)"); - - b.Property("MetaKeywords") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("MetaTitle") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("PublishedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("LatestUpdatedById"); - - b.ToTable("Cms_Page", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Comments.Models.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CommentText") - .HasColumnType("nvarchar(max)"); - - b.Property("CommenterName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("EntityId") - .HasColumnType("bigint"); - - b.Property("EntityTypeId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("UserId"); - - b.ToTable("Comments_Comment", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Contacts.Models.Contact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Address") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ContactAreaId") - .HasColumnType("bigint"); - - b.Property("Content") - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("EmailAddress") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("FullName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("PhoneNumber") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("ContactAreaId"); - - b.ToTable("Contacts_Contact", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Contacts.Models.ContactArea", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Contacts_ContactArea", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Address", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AddressLine1") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("AddressLine2") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("City") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ContactName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CountryId") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("DistrictId") - .HasColumnType("bigint"); - - b.Property("Phone") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("StateOrProvinceId") - .HasColumnType("bigint"); - - b.Property("ZipCode") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CountryId"); - - b.HasIndex("DistrictId"); - - b.HasIndex("StateOrProvinceId"); - - b.ToTable("Core_Address", (string)null); - - b.HasData( - new - { - Id = 1L, - AddressLine1 = "364 Cong Hoa", - ContactName = "Thien Nguyen", - CountryId = "VN", - StateOrProvinceId = 1L - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.AppSetting", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("IsVisibleInCommonSettingPage") - .HasColumnType("bit"); - - b.Property("Module") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Core_AppSetting", (string)null); - - b.HasData( - new - { - Id = "Catalog.ProductPageSize", - IsVisibleInCommonSettingPage = true, - Module = "Catalog", - Value = "10" - }, - new - { - Id = "Catalog.IsProductPriceIncludeTax", - IsVisibleInCommonSettingPage = true, - Module = "Catalog", - Value = "true" - }, - new - { - Id = "Catalog.MinimumProductQuantityForHighlighting", - IsVisibleInCommonSettingPage = true, - Module = "Catalog", - Value = "5" - }, - new - { - Id = "Catalog.IsCommentsRequireApproval", - IsVisibleInCommonSettingPage = true, - Module = "Catalog", - Value = "true" - }, - new - { - Id = "GoogleAppKey", - IsVisibleInCommonSettingPage = false, - Module = "Contact", - Value = "" - }, - new - { - Id = "Global.AssetVersion", - IsVisibleInCommonSettingPage = true, - Module = "Core", - Value = "1.0" - }, - new - { - Id = "Global.AssetBundling", - IsVisibleInCommonSettingPage = true, - Module = "Core", - Value = "false" - }, - new - { - Id = "Theme", - IsVisibleInCommonSettingPage = false, - Module = "Core", - Value = "Generic" - }, - new - { - Id = "Global.DefaultCultureUI", - IsVisibleInCommonSettingPage = true, - Module = "Core", - Value = "en-US" - }, - new - { - Id = "Global.DefaultCultureAdminUI", - IsVisibleInCommonSettingPage = true, - Module = "Core", - Value = "en-US" - }, - new - { - Id = "Global.CurrencyCulture", - IsVisibleInCommonSettingPage = true, - Module = "Core", - Value = "en-US" - }, - new - { - Id = "Global.CurrencyDecimalPlace", - IsVisibleInCommonSettingPage = true, - Module = "Core", - Value = "2" - }, - new - { - Id = "SmtpServer", - IsVisibleInCommonSettingPage = false, - Module = "EmailSenderSmpt", - Value = "smtp.gmail.com" - }, - new - { - Id = "SmtpPort", - IsVisibleInCommonSettingPage = false, - Module = "EmailSenderSmpt", - Value = "587" - }, - new - { - Id = "SmtpUsername", - IsVisibleInCommonSettingPage = false, - Module = "EmailSenderSmpt", - Value = "" - }, - new - { - Id = "SmtpPassword", - IsVisibleInCommonSettingPage = false, - Module = "EmailSenderSmpt", - Value = "" - }, - new - { - Id = "Localization.LocalizedConentEnable", - IsVisibleInCommonSettingPage = true, - Module = "Localization", - Value = "true" - }, - new - { - Id = "News.PageSize", - IsVisibleInCommonSettingPage = true, - Module = "News", - Value = "10" - }, - new - { - Id = "Tax.DefaultTaxClassId", - IsVisibleInCommonSettingPage = true, - Module = "Tax", - Value = "1" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Country", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("Code3") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("IsBillingEnabled") - .HasColumnType("bit"); - - b.Property("IsCityEnabled") - .HasColumnType("bit"); - - b.Property("IsDistrictEnabled") - .HasColumnType("bit"); - - b.Property("IsShippingEnabled") - .HasColumnType("bit"); - - b.Property("IsZipCodeEnabled") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Core_Country", (string)null); - - b.HasData( - new - { - Id = "VN", - Code3 = "VNM", - IsBillingEnabled = true, - IsCityEnabled = false, - IsDistrictEnabled = true, - IsShippingEnabled = true, - IsZipCodeEnabled = false, - Name = "Việt Nam" - }, - new - { - Id = "US", - Code3 = "USA", - IsBillingEnabled = true, - IsCityEnabled = true, - IsDistrictEnabled = false, - IsShippingEnabled = true, - IsZipCodeEnabled = true, - Name = "United States" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("Core_CustomerGroup", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroupUser", b => - { - b.Property("UserId") - .HasColumnType("bigint"); - - b.Property("CustomerGroupId") - .HasColumnType("bigint"); - - b.HasKey("UserId", "CustomerGroupId"); - - b.HasIndex("CustomerGroupId"); - - b.ToTable("Core_CustomerGroupUser", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.District", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Location") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("StateOrProvinceId") - .HasColumnType("bigint"); - - b.Property("Type") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("StateOrProvinceId"); - - b.ToTable("Core_District", (string)null); - - b.HasData( - new - { - Id = 1L, - Name = "Quận 1", - StateOrProvinceId = 1L, - Type = "Quận" - }, - new - { - Id = 2L, - Name = "Quận 2", - StateOrProvinceId = 1L, - Type = "Quận" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Entity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("EntityId") - .HasColumnType("bigint"); - - b.Property("EntityTypeId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("Core_Entity", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.EntityType", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AreaName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("IsMenuable") - .HasColumnType("bit"); - - b.Property("RoutingAction") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("RoutingController") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Core_EntityType", (string)null); - - b.HasData( - new - { - Id = "Category", - AreaName = "Catalog", - IsMenuable = true, - RoutingAction = "CategoryDetail", - RoutingController = "Category" - }, - new - { - Id = "Brand", - AreaName = "Catalog", - IsMenuable = true, - RoutingAction = "BrandDetail", - RoutingController = "Brand" - }, - new - { - Id = "Product", - AreaName = "Catalog", - IsMenuable = false, - RoutingAction = "ProductDetail", - RoutingController = "Product" - }, - new - { - Id = "Page", - AreaName = "Cms", - IsMenuable = true, - RoutingAction = "PageDetail", - RoutingController = "Page" - }, - new - { - Id = "Vendor", - AreaName = "Core", - IsMenuable = false, - RoutingAction = "VendorDetail", - RoutingController = "Vendor" - }, - new - { - Id = "NewsCategory", - AreaName = "News", - IsMenuable = true, - RoutingAction = "NewsCategoryDetail", - RoutingController = "NewsCategory" - }, - new - { - Id = "NewsItem", - AreaName = "News", - IsMenuable = false, - RoutingAction = "NewsItemDetail", - RoutingController = "NewsItem" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Media", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Caption") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("FileName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("FileSize") - .HasColumnType("int"); - - b.Property("MediaType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Core_Media", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("Core_Role", (string)null); - - b.HasData( - new - { - Id = 1L, - ConcurrencyStamp = "4776a1b2-dbe4-4056-82ec-8bed211d1454", - Name = "admin", - NormalizedName = "ADMIN" - }, - new - { - Id = 2L, - ConcurrencyStamp = "00d172be-03a0-4856-8b12-26d63fcf4374", - Name = "customer", - NormalizedName = "CUSTOMER" - }, - new - { - Id = 3L, - ConcurrencyStamp = "d4754388-8355-4018-b728-218018836817", - Name = "guest", - NormalizedName = "GUEST" - }, - new - { - Id = 4L, - ConcurrencyStamp = "71f10604-8c4d-4a7d-ac4a-ffefb11cefeb", - Name = "vendor", - NormalizedName = "VENDOR" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.StateOrProvince", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Code") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CountryId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Type") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CountryId"); - - b.ToTable("Core_StateOrProvince", (string)null); - - b.HasData( - new - { - Id = 1L, - CountryId = "VN", - Name = "Hồ Chí Minh", - Type = "Thành Phố" - }, - new - { - Id = 2L, - Code = "WA", - CountryId = "US", - Name = "Washington" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Culture") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("DefaultBillingAddressId") - .HasColumnType("bigint"); - - b.Property("DefaultShippingAddressId") - .HasColumnType("bigint"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("ExtensionData") - .HasColumnType("nvarchar(max)"); - - b.Property("FullName") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("RefreshTokenHash") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserGuid") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("VendorId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("DefaultBillingAddressId"); - - b.HasIndex("DefaultShippingAddressId"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.HasIndex("VendorId"); - - b.ToTable("Core_User", (string)null); - - b.HasData( - new - { - Id = 2L, - AccessFailedCount = 0, - ConcurrencyStamp = "101cd6ae-a8ef-4a37-97fd-04ac2dd630e4", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - Email = "system@simplcommerce.com", - EmailConfirmed = false, - FullName = "System User", - IsDeleted = true, - LatestUpdatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - LockoutEnabled = false, - NormalizedEmail = "SYSTEM@SIMPLCOMMERCE.COM", - NormalizedUserName = "SYSTEM@SIMPLCOMMERCE.COM", - PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", - PhoneNumberConfirmed = false, - SecurityStamp = "a9565acb-cee6-425f-9833-419a793f5fba", - TwoFactorEnabled = false, - UserGuid = new Guid("5f72f83b-7436-4221-869c-1b69b2e23aae"), - UserName = "system@simplcommerce.com" - }, - new - { - Id = 10L, - AccessFailedCount = 0, - ConcurrencyStamp = "c83afcbc-312c-4589-bad7-8686bd4754c0", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - Email = "admin@simplcommerce.com", - EmailConfirmed = false, - FullName = "Shop Admin", - IsDeleted = false, - LatestUpdatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - LockoutEnabled = false, - NormalizedEmail = "ADMIN@SIMPLCOMMERCE.COM", - NormalizedUserName = "ADMIN@SIMPLCOMMERCE.COM", - PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", - PhoneNumberConfirmed = false, - SecurityStamp = "d6847450-47f0-4c7a-9fed-0c66234bf61f", - TwoFactorEnabled = false, - UserGuid = new Guid("ed8210c3-24b0-4823-a744-80078cf12eb4"), - UserName = "admin@simplcommerce.com" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserAddress", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AddressId") - .HasColumnType("bigint"); - - b.Property("AddressType") - .HasColumnType("int"); - - b.Property("LastUsedOn") - .HasColumnType("datetimeoffset"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("AddressId"); - - b.HasIndex("UserId"); - - b.ToTable("Core_UserAddress", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserRole", b => - { - b.Property("UserId") - .HasColumnType("bigint"); - - b.Property("RoleId") - .HasColumnType("bigint"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("Core_UserRole", (string)null); - - b.HasData( - new - { - UserId = 10L, - RoleId = 1L - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Vendor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("Email") - .HasColumnType("nvarchar(max)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Core_Vendor", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Widget", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("CreateUrl") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("EditUrl") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ViewComponentName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Core_Widget", (string)null); - - b.HasData( - new - { - Id = "CategoryWidget", - CreateUrl = "widget-category-create", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 160, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - EditUrl = "widget-category-edit", - IsPublished = false, - Name = "Category Widget", - ViewComponentName = "CategoryWidget" - }, - new - { - Id = "ProductWidget", - CreateUrl = "widget-product-create", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - EditUrl = "widget-product-edit", - IsPublished = false, - Name = "Product Widget", - ViewComponentName = "ProductWidget" - }, - new - { - Id = "SimpleProductWidget", - CreateUrl = "widget-simple-product-create", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - EditUrl = "widget-simple-product-edit", - IsPublished = false, - Name = "Simple Product Widget", - ViewComponentName = "SimpleProductWidget" - }, - new - { - Id = "HtmlWidget", - CreateUrl = "widget-html-create", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - EditUrl = "widget-html-edit", - IsPublished = false, - Name = "Html Widget", - ViewComponentName = "HtmlWidget" - }, - new - { - Id = "CarouselWidget", - CreateUrl = "widget-carousel-create", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - EditUrl = "widget-carousel-edit", - IsPublished = false, - Name = "Carousel Widget", - ViewComponentName = "CarouselWidget" - }, - new - { - Id = "SpaceBarWidget", - CreateUrl = "widget-spacebar-create", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - EditUrl = "widget-spacebar-edit", - IsPublished = false, - Name = "SpaceBar Widget", - ViewComponentName = "SpaceBarWidget" - }, - new - { - Id = "RecentlyViewedWidget", - CreateUrl = "widget-recently-viewed-create", - CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), - EditUrl = "widget-recently-viewed-edit", - IsPublished = false, - Name = "Recently Viewed Widget", - ViewComponentName = "RecentlyViewedWidget" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.WidgetInstance", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Data") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayOrder") - .HasColumnType("int"); - - b.Property("HtmlData") - .HasColumnType("nvarchar(max)"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("PublishEnd") - .HasColumnType("datetimeoffset"); - - b.Property("PublishStart") - .HasColumnType("datetimeoffset"); - - b.Property("WidgetId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("WidgetZoneId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("WidgetId"); - - b.HasIndex("WidgetZoneId"); - - b.ToTable("Core_WidgetInstance", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.WidgetZone", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Core_WidgetZone", (string)null); - - b.HasData( - new - { - Id = 1L, - Name = "Home Featured" - }, - new - { - Id = 2L, - Name = "Home Main Content" - }, - new - { - Id = 3L, - Name = "Home After Main Content" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.ProductBackInStockSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomerEmail") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.ToTable("Inventory_ProductBackInStockSubscription", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Stock", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("ReservedQuantity") - .HasColumnType("int"); - - b.Property("WarehouseId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ProductId"); - - b.HasIndex("WarehouseId"); - - b.ToTable("Inventory_Stock", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.StockHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AdjustedQuantity") - .HasColumnType("bigint"); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Note") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("WarehouseId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("ProductId"); - - b.HasIndex("WarehouseId"); - - b.ToTable("Inventory_StockHistory", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Warehouse", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AddressId") - .HasColumnType("bigint"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("VendorId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("AddressId"); - - b.HasIndex("VendorId"); - - b.ToTable("Inventory_Warehouse", (string)null); - - b.HasData( - new - { - Id = 1L, - AddressId = 1L, - Name = "Default warehouse" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayOrder") - .HasColumnType("int"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("MetaDescription") - .HasColumnType("nvarchar(max)"); - - b.Property("MetaKeywords") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("MetaTitle") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("News_NewsCategory", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("FullContent") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsPublished") - .HasColumnType("bit"); - - b.Property("LatestUpdatedById") - .HasColumnType("bigint"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("MetaDescription") - .HasColumnType("nvarchar(max)"); - - b.Property("MetaKeywords") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("MetaTitle") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("PublishedOn") - .HasColumnType("datetimeoffset"); - - b.Property("ShortContent") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ThumbnailImageId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("LatestUpdatedById"); - - b.HasIndex("ThumbnailImageId"); - - b.ToTable("News_NewsItem", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItemCategory", b => - { - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("NewsItemId") - .HasColumnType("bigint"); - - b.HasKey("CategoryId", "NewsItemId"); - - b.HasIndex("NewsItemId"); - - b.ToTable("News_NewsItemCategory", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.Order", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("BillingAddressId") - .HasColumnType("bigint"); - - b.Property("CouponCode") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CouponRuleName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("CustomerId") - .HasColumnType("bigint"); - - b.Property("DiscountAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("IsMasterOrder") - .HasColumnType("bit"); - - b.Property("LatestUpdatedById") - .HasColumnType("bigint"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("OrderNote") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("OrderStatus") - .HasColumnType("int"); - - b.Property("OrderTotal") - .HasColumnType("decimal(18,2)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("PaymentFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("PaymentMethod") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ShippingAddressId") - .HasColumnType("bigint"); - - b.Property("ShippingFeeAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("ShippingMethod") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("SubTotal") - .HasColumnType("decimal(18,2)"); - - b.Property("SubTotalWithDiscount") - .HasColumnType("decimal(18,2)"); - - b.Property("TaxAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("VendorId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("BillingAddressId"); - - b.HasIndex("CreatedById"); - - b.HasIndex("CustomerId"); - - b.HasIndex("LatestUpdatedById"); - - b.HasIndex("ParentId"); - - b.HasIndex("ShippingAddressId"); - - b.ToTable("Orders_Order", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderAddress", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AddressLine1") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("AddressLine2") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("City") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ContactName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CountryId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("DistrictId") - .HasColumnType("bigint"); - - b.Property("Phone") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("StateOrProvinceId") - .HasColumnType("bigint"); - - b.Property("ZipCode") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CountryId"); - - b.HasIndex("DistrictId"); - - b.HasIndex("StateOrProvinceId"); - - b.ToTable("Orders_OrderAddress", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("NewStatus") - .HasColumnType("int"); - - b.Property("Note") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("OldStatus") - .HasColumnType("int"); - - b.Property("OrderId") - .HasColumnType("bigint"); - - b.Property("OrderSnapshot") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("OrderId"); - - b.ToTable("Orders_OrderHistory", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("DiscountAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("OrderId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("ProductPrice") - .HasColumnType("decimal(18,2)"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("TaxAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("TaxPercent") - .HasColumnType("decimal(18,2)"); - - b.HasKey("Id"); - - b.HasIndex("OrderId"); - - b.HasIndex("ProductId"); - - b.ToTable("Orders_OrderItem", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Payments.Models.Payment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("decimal(18,2)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("FailureMessage") - .HasColumnType("nvarchar(max)"); - - b.Property("GatewayTransactionId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("OrderId") - .HasColumnType("bigint"); - - b.Property("PaymentFee") - .HasColumnType("decimal(18,2)"); - - b.Property("PaymentMethod") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Status") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("OrderId"); - - b.ToTable("Payments_Payment", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Payments.Models.PaymentProvider", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AdditionalSettings") - .HasColumnType("nvarchar(max)"); - - b.Property("ConfigureUrl") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("IsEnabled") - .HasColumnType("bit"); - - b.Property("LandingViewComponentName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Payments_PaymentProvider", (string)null); - - b.HasData( - new - { - Id = "Braintree", - AdditionalSettings = "{\"PublicKey\": \"6j4d7qspt5n48kx4\", \"PrivateKey\" : \"bd1c26e53a6d811243fcc3eb268113e1\", \"MerchantId\" : \"ncsh7wwqvzs3cx9q\", \"IsProduction\" : \"false\"}", - ConfigureUrl = "payments-braintree-config", - IsEnabled = true, - LandingViewComponentName = "BraintreeLanding", - Name = "Braintree" - }, - new - { - Id = "CoD", - ConfigureUrl = "payments-cod-config", - IsEnabled = true, - LandingViewComponentName = "CoDLanding", - Name = "Cash On Delivery" - }, - new - { - Id = "PaypalExpress", - AdditionalSettings = "{ \"IsSandbox\":true, \"ClientId\":\"\", \"ClientSecret\":\"\" }", - ConfigureUrl = "payments-paypalExpress-config", - IsEnabled = true, - LandingViewComponentName = "PaypalExpressLanding", - Name = "Paypal Express" - }, - new - { - Id = "Stripe", - AdditionalSettings = "{\"PublicKey\": \"pk_test_6pRNASCoBOKtIshFeQd4XMUh\", \"PrivateKey\" : \"sk_test_BQokikJOvBiI2HlWgH4olfQ2\"}", - ConfigureUrl = "payments-stripe-config", - IsEnabled = true, - LandingViewComponentName = "StripeLanding", - Name = "Stripe" - }, - new - { - Id = "MomoPayment", - AdditionalSettings = "{\"IsSandbox\":true,\"PartnerCode\":\"MOMOIQA420180417\",\"AccessKey\":\"SvDmj2cOTYZmQQ3H\",\"SecretKey\":\"PPuDXq1KowPT1ftR8DvlQTHhC03aul17\",\"PaymentFee\":0.0}", - ConfigureUrl = "payments-momo-config", - IsEnabled = true, - LandingViewComponentName = "MomoLanding", - Name = "Momo Payment" - }, - new - { - Id = "NganLuong", - AdditionalSettings = "{\"IsSandbox\":true, \"MerchantId\": 47249, \"MerchantPassword\": \"e530745693dbde678f9da98a7c821a07\", \"ReceiverEmail\": \"nlqthien@gmail.com\"}", - ConfigureUrl = "payments-nganluong-config", - IsEnabled = true, - LandingViewComponentName = "NganLuongLanding", - Name = "Ngan Luong Payment" - }, - new - { - Id = "Cashfree", - AdditionalSettings = "{ \"IsSandbox\":true, \"AppId\":\"358035b02486f36ca27904540853\", \"SecretKey\":\"26f48dcd6a27f89f59f28e65849e587916dd57b9\" }", - ConfigureUrl = "payments-cashfree-config", - IsEnabled = true, - LandingViewComponentName = "CashfreeLanding", - Name = "Cashfree Payment Gateway" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("DiscountAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("DiscountStep") - .HasColumnType("int"); - - b.Property("EndOn") - .HasColumnType("datetimeoffset"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("IsCouponRequired") - .HasColumnType("bit"); - - b.Property("MaxDiscountAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("RuleToApply") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("StartOn") - .HasColumnType("datetimeoffset"); - - b.Property("UsageLimitPerCoupon") - .HasColumnType("int"); - - b.Property("UsageLimitPerCustomer") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Pricing_CartRule", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCategory", b => - { - b.Property("CartRuleId") - .HasColumnType("bigint"); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.HasKey("CartRuleId", "CategoryId"); - - b.HasIndex("CategoryId"); - - b.ToTable("Pricing_CartRuleCategory", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCustomerGroup", b => - { - b.Property("CartRuleId") - .HasColumnType("bigint"); - - b.Property("CustomerGroupId") - .HasColumnType("bigint"); - - b.HasKey("CartRuleId", "CustomerGroupId"); - - b.HasIndex("CustomerGroupId"); - - b.ToTable("Pricing_CartRuleCustomerGroup", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleProduct", b => - { - b.Property("CartRuleId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.HasKey("CartRuleId", "ProductId"); - - b.HasIndex("ProductId"); - - b.ToTable("Pricing_CartRuleProduct", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleUsage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CartRuleId") - .HasColumnType("bigint"); - - b.Property("CouponId") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("OrderId") - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CartRuleId"); - - b.HasIndex("CouponId"); - - b.HasIndex("UserId"); - - b.ToTable("Pricing_CartRuleUsage", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("DiscountAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("EndOn") - .HasColumnType("datetimeoffset"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("MaxDiscountAmount") - .HasColumnType("decimal(18,2)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("RuleToApply") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("StartOn") - .HasColumnType("datetimeoffset"); - - b.HasKey("Id"); - - b.ToTable("Pricing_CatalogRule", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRuleCustomerGroup", b => - { - b.Property("CatalogRuleId") - .HasColumnType("bigint"); - - b.Property("CustomerGroupId") - .HasColumnType("bigint"); - - b.HasKey("CatalogRuleId", "CustomerGroupId"); - - b.HasIndex("CustomerGroupId"); - - b.ToTable("Pricing_CatalogRuleCustomerGroup", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.Coupon", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CartRuleId") - .HasColumnType("bigint"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.HasKey("Id"); - - b.HasIndex("CartRuleId"); - - b.ToTable("Pricing_Coupon", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.ProductComparison.Models.ComparingProduct", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ProductId"); - - b.HasIndex("UserId"); - - b.ToTable("ProductComparison_ComparingProduct", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.ProductRecentlyViewed.Models.RecentlyViewedProduct", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("LatestViewedOn") - .HasColumnType("datetimeoffset"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.ToTable("ProductRecentlyViewed_RecentlyViewedProduct", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Reply", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Comment") - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("ReplierName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ReviewId") - .HasColumnType("bigint"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ReviewId"); - - b.HasIndex("UserId"); - - b.ToTable("Reviews_Reply", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Review", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Comment") - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("EntityId") - .HasColumnType("bigint"); - - b.Property("EntityTypeId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Rating") - .HasColumnType("int"); - - b.Property("ReviewerName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Title") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Reviews_Review", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Search.Models.Query", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("QueryText") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("ResultsCount") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Search_Query", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.Shipment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedById") - .HasColumnType("bigint"); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("OrderId") - .HasColumnType("bigint"); - - b.Property("TrackingNumber") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("VendorId") - .HasColumnType("bigint"); - - b.Property("WarehouseId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("OrderId"); - - b.HasIndex("WarehouseId"); - - b.ToTable("Shipments_Shipment", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.ShipmentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("OrderItemId") - .HasColumnType("bigint"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("ShipmentId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ProductId"); - - b.HasIndex("ShipmentId"); - - b.ToTable("Shipments_ShipmentItem", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Shipping.Models.ShippingProvider", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AdditionalSettings") - .HasColumnType("nvarchar(max)"); - - b.Property("ConfigureUrl") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("IsEnabled") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("OnlyCountryIdsString") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("OnlyStateOrProvinceIdsString") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("ShippingPriceServiceTypeName") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("ToAllShippingEnabledCountries") - .HasColumnType("bit"); - - b.Property("ToAllShippingEnabledStatesOrProvinces") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.ToTable("Shipping_ShippingProvider", (string)null); - - b.HasData( - new - { - Id = "FreeShip", - AdditionalSettings = "{MinimumOrderAmount : 1}", - ConfigureUrl = "", - IsEnabled = true, - Name = "Free Ship", - ShippingPriceServiceTypeName = "SimplCommerce.Module.ShippingFree.Services.FreeShippingServiceProvider,SimplCommerce.Module.ShippingFree", - ToAllShippingEnabledCountries = true, - ToAllShippingEnabledStatesOrProvinces = true - }, - new - { - Id = "TableRate", - ConfigureUrl = "shipping-table-rate-config", - IsEnabled = true, - Name = "Table Rate", - ShippingPriceServiceTypeName = "SimplCommerce.Module.ShippingTableRate.Services.TableRateShippingServiceProvider,SimplCommerce.Module.ShippingTableRate", - ToAllShippingEnabledCountries = true, - ToAllShippingEnabledStatesOrProvinces = true - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.ShippingTableRate.Models.PriceAndDestination", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CountryId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("DistrictId") - .HasColumnType("bigint"); - - b.Property("MinOrderSubtotal") - .HasColumnType("decimal(18,2)"); - - b.Property("Note") - .HasColumnType("nvarchar(max)"); - - b.Property("ShippingPrice") - .HasColumnType("decimal(18,2)"); - - b.Property("StateOrProvinceId") - .HasColumnType("bigint"); - - b.Property("ZipCode") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CountryId"); - - b.HasIndex("DistrictId"); - - b.HasIndex("StateOrProvinceId"); - - b.ToTable("ShippingTableRate_PriceAndDestination", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.ShoppingCart.Models.CartItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("CustomerId") - .HasColumnType("bigint"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("VendorId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CustomerId"); - - b.HasIndex("ProductId"); - - b.ToTable("ShoppingCart_CartItem", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.Tax.Models.TaxClass", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Name") - .IsRequired() - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.ToTable("Tax_TaxClass", (string)null); - - b.HasData( - new - { - Id = 1L, - Name = "Standard VAT" - }); - }); - - modelBuilder.Entity("SimplCommerce.Module.Tax.Models.TaxRate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CountryId") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("Rate") - .HasColumnType("decimal(18,2)"); - - b.Property("StateOrProvinceId") - .HasColumnType("bigint"); - - b.Property("TaxClassId") - .HasColumnType("bigint"); - - b.Property("ZipCode") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CountryId"); - - b.HasIndex("StateOrProvinceId"); - - b.HasIndex("TaxClassId"); - - b.ToTable("Tax_TaxRate", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishList", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("SharingCode") - .HasMaxLength(450) - .HasColumnType("nvarchar(450)"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("WishList_WishList", (string)null); - }); - - modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishListItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("LatestUpdatedOn") - .HasColumnType("datetimeoffset"); - - b.Property("ProductId") - .HasColumnType("bigint"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("WishListId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ProductId"); - - b.HasIndex("WishListId"); - - b.ToTable("WishList_WishListItem", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.LocalizedContentProperty", b => - { - b.HasOne("SimplCommerce.Infrastructure.Localization.Culture", "Culture") - .WithMany() - .HasForeignKey("CultureId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Culture"); - }); - - modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Resource", b => - { - b.HasOne("SimplCommerce.Infrastructure.Localization.Culture", "Culture") - .WithMany("Resources") - .HasForeignKey("CultureId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Culture"); - }); - - modelBuilder.Entity("SimplCommerce.Module.ActivityLog.Models.Activity", b => - { - b.HasOne("SimplCommerce.Module.ActivityLog.Models.ActivityType", "ActivityType") - .WithMany() - .HasForeignKey("ActivityTypeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ActivityType"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Category", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Category", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.Media", "ThumbnailImage") - .WithMany() - .HasForeignKey("ThumbnailImageId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Parent"); - - b.Navigation("ThumbnailImage"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Product", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Brand", "Brand") - .WithMany() - .HasForeignKey("BrandId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") - .WithMany() - .HasForeignKey("LatestUpdatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Tax.Models.TaxClass", "TaxClass") - .WithMany() - .HasForeignKey("TaxClassId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.Media", "ThumbnailImage") - .WithMany() - .HasForeignKey("ThumbnailImageId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Brand"); - - b.Navigation("CreatedBy"); - - b.Navigation("LatestUpdatedBy"); - - b.Navigation("TaxClass"); - - b.Navigation("ThumbnailImage"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttribute", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.ProductAttributeGroup", "Group") - .WithMany("Attributes") - .HasForeignKey("GroupId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Group"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeValue", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.ProductAttribute", "Attribute") - .WithMany() - .HasForeignKey("AttributeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany("AttributeValues") - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Attribute"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductCategory", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Category", "Category") - .WithMany() - .HasForeignKey("CategoryId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany("Categories") - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Category"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductLink", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "LinkedProduct") - .WithMany("LinkedProductLinks") - .HasForeignKey("LinkedProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany("ProductLinks") - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("LinkedProduct"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductMedia", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Media", "Media") - .WithMany() - .HasForeignKey("MediaId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany("Medias") - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Media"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionCombination", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.ProductOption", "Option") - .WithMany() - .HasForeignKey("OptionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany("OptionCombinations") - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Option"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductOptionValue", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.ProductOption", "Option") - .WithMany() - .HasForeignKey("OptionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany("OptionValues") - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Option"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductPriceHistory", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany("PriceHistories") - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("CreatedBy"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplateProductAttribute", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.ProductAttribute", "ProductAttribute") - .WithMany("ProductTemplates") - .HasForeignKey("ProductAttributeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.ProductTemplate", "ProductTemplate") - .WithMany("ProductAttributes") - .HasForeignKey("ProductTemplateId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ProductAttribute"); - - b.Navigation("ProductTemplate"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.Checkout", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "Customer") - .WithMany() - .HasForeignKey("CustomerId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Customer"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.CheckoutItem", b => - { - b.HasOne("SimplCommerce.Module.Checkouts.Models.Checkout", "Checkout") - .WithMany("CheckoutItems") - .HasForeignKey("CheckoutId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Checkout"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Cms.Models.MenuItem", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Entity", "Entity") - .WithMany() - .HasForeignKey("EntityId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Cms.Models.Menu", "Menu") - .WithMany("MenuItems") - .HasForeignKey("MenuId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Cms.Models.MenuItem", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Entity"); - - b.Navigation("Menu"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Page", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") - .WithMany() - .HasForeignKey("LatestUpdatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("LatestUpdatedBy"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Comments.Models.Comment", b => - { - b.HasOne("SimplCommerce.Module.Comments.Models.Comment", "Parent") - .WithMany("Replies") - .HasForeignKey("ParentId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Parent"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Contacts.Models.Contact", b => - { - b.HasOne("SimplCommerce.Module.Contacts.Models.ContactArea", "ContactArea") - .WithMany() - .HasForeignKey("ContactAreaId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ContactArea"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Address", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") - .WithMany() - .HasForeignKey("CountryId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.District", "District") - .WithMany() - .HasForeignKey("DistrictId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") - .WithMany() - .HasForeignKey("StateOrProvinceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Country"); - - b.Navigation("District"); - - b.Navigation("StateOrProvince"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroupUser", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.CustomerGroup", "CustomerGroup") - .WithMany("Users") - .HasForeignKey("CustomerGroupId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany("CustomerGroups") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CustomerGroup"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.District", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") - .WithMany() - .HasForeignKey("StateOrProvinceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("StateOrProvince"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Entity", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.EntityType", "EntityType") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("EntityType"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.StateOrProvince", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") - .WithMany("StatesOrProvinces") - .HasForeignKey("CountryId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Country"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.User", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.UserAddress", "DefaultBillingAddress") - .WithMany() - .HasForeignKey("DefaultBillingAddressId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.UserAddress", "DefaultShippingAddress") - .WithMany() - .HasForeignKey("DefaultShippingAddressId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.Vendor", null) - .WithMany("Users") - .HasForeignKey("VendorId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("DefaultBillingAddress"); - - b.Navigation("DefaultShippingAddress"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserAddress", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Address", "Address") - .WithMany("UserAddresses") - .HasForeignKey("AddressId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany("UserAddresses") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Address"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.UserRole", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Role", "Role") - .WithMany("Users") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Role"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.WidgetInstance", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Widget", "Widget") - .WithMany() - .HasForeignKey("WidgetId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.WidgetZone", "WidgetZone") - .WithMany() - .HasForeignKey("WidgetZoneId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Widget"); - - b.Navigation("WidgetZone"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Stock", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Inventory.Models.Warehouse", "Warehouse") - .WithMany() - .HasForeignKey("WarehouseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Product"); - - b.Navigation("Warehouse"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.StockHistory", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Inventory.Models.Warehouse", "Warehouse") - .WithMany() - .HasForeignKey("WarehouseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Product"); - - b.Navigation("Warehouse"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Inventory.Models.Warehouse", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Address", "Address") - .WithMany() - .HasForeignKey("AddressId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.Vendor", "Vendor") - .WithMany() - .HasForeignKey("VendorId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Address"); - - b.Navigation("Vendor"); - }); - - modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItem", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") - .WithMany() - .HasForeignKey("LatestUpdatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.Media", "ThumbnailImage") - .WithMany() - .HasForeignKey("ThumbnailImageId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("CreatedBy"); - - b.Navigation("LatestUpdatedBy"); - - b.Navigation("ThumbnailImage"); - }); - - modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItemCategory", b => - { - b.HasOne("SimplCommerce.Module.News.Models.NewsCategory", "Category") - .WithMany("NewsItems") - .HasForeignKey("CategoryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.News.Models.NewsItem", "NewsItem") - .WithMany("Categories") - .HasForeignKey("NewsItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Category"); - - b.Navigation("NewsItem"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.Order", b => - { - b.HasOne("SimplCommerce.Module.Orders.Models.OrderAddress", "BillingAddress") - .WithMany() - .HasForeignKey("BillingAddressId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "Customer") - .WithMany() - .HasForeignKey("CustomerId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "LatestUpdatedBy") - .WithMany() - .HasForeignKey("LatestUpdatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Orders.Models.OrderAddress", "ShippingAddress") - .WithMany() - .HasForeignKey("ShippingAddressId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("BillingAddress"); - - b.Navigation("CreatedBy"); - - b.Navigation("Customer"); - - b.Navigation("LatestUpdatedBy"); - - b.Navigation("Parent"); - - b.Navigation("ShippingAddress"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderAddress", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") - .WithMany() - .HasForeignKey("CountryId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.District", "District") - .WithMany() - .HasForeignKey("DistrictId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") - .WithMany() - .HasForeignKey("StateOrProvinceId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Country"); - - b.Navigation("District"); - - b.Navigation("StateOrProvince"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderHistory", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") - .WithMany() - .HasForeignKey("OrderId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Order"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.OrderItem", b => - { - b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") - .WithMany("OrderItems") - .HasForeignKey("OrderId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Order"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Payments.Models.Payment", b => - { - b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") - .WithMany() - .HasForeignKey("OrderId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Order"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCategory", b => - { - b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") - .WithMany("Categories") - .HasForeignKey("CartRuleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Category", "Category") - .WithMany() - .HasForeignKey("CategoryId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CartRule"); - - b.Navigation("Category"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleCustomerGroup", b => - { - b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") - .WithMany("CustomerGroups") - .HasForeignKey("CartRuleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.CustomerGroup", "CustomerGroup") - .WithMany() - .HasForeignKey("CustomerGroupId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CartRule"); - - b.Navigation("CustomerGroup"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleProduct", b => - { - b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") - .WithMany("Products") - .HasForeignKey("CartRuleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CartRule"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRuleUsage", b => - { - b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") - .WithMany() - .HasForeignKey("CartRuleId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Pricing.Models.Coupon", "Coupon") - .WithMany() - .HasForeignKey("CouponId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CartRule"); - - b.Navigation("Coupon"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRuleCustomerGroup", b => - { - b.HasOne("SimplCommerce.Module.Pricing.Models.CatalogRule", "CatalogRule") - .WithMany("CustomerGroups") - .HasForeignKey("CatalogRuleId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.CustomerGroup", "CustomerGroup") - .WithMany() - .HasForeignKey("CustomerGroupId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CatalogRule"); - - b.Navigation("CustomerGroup"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.Coupon", b => - { - b.HasOne("SimplCommerce.Module.Pricing.Models.CartRule", "CartRule") - .WithMany("Coupons") - .HasForeignKey("CartRuleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CartRule"); - }); - - modelBuilder.Entity("SimplCommerce.Module.ProductComparison.Models.ComparingProduct", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Product"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Reply", b => - { - b.HasOne("SimplCommerce.Module.Reviews.Models.Review", "Review") - .WithMany("Replies") - .HasForeignKey("ReviewId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Review"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Review", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.Shipment", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "CreatedBy") - .WithMany() - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Orders.Models.Order", "Order") - .WithMany() - .HasForeignKey("OrderId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Inventory.Models.Warehouse", "Warehouse") - .WithMany() - .HasForeignKey("WarehouseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Order"); - - b.Navigation("Warehouse"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.ShipmentItem", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Shipments.Models.Shipment", "Shipment") - .WithMany("Items") - .HasForeignKey("ShipmentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Product"); - - b.Navigation("Shipment"); - }); - - modelBuilder.Entity("SimplCommerce.Module.ShippingTableRate.Models.PriceAndDestination", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") - .WithMany() - .HasForeignKey("CountryId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.District", "District") - .WithMany() - .HasForeignKey("DistrictId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") - .WithMany() - .HasForeignKey("StateOrProvinceId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Country"); - - b.Navigation("District"); - - b.Navigation("StateOrProvince"); - }); - - modelBuilder.Entity("SimplCommerce.Module.ShoppingCart.Models.CartItem", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "Customer") - .WithMany() - .HasForeignKey("CustomerId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Customer"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Tax.Models.TaxRate", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.Country", "Country") - .WithMany() - .HasForeignKey("CountryId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Core.Models.StateOrProvince", "StateOrProvince") - .WithMany() - .HasForeignKey("StateOrProvinceId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("SimplCommerce.Module.Tax.Models.TaxClass", "TaxClass") - .WithMany() - .HasForeignKey("TaxClassId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Country"); - - b.Navigation("StateOrProvince"); - - b.Navigation("TaxClass"); - }); - - modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishList", b => - { - b.HasOne("SimplCommerce.Module.Core.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishListItem", b => - { - b.HasOne("SimplCommerce.Module.Catalog.Models.Product", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("SimplCommerce.Module.WishList.Models.WishList", "WishList") - .WithMany("Items") - .HasForeignKey("WishListId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Product"); - - b.Navigation("WishList"); - }); - - modelBuilder.Entity("SimplCommerce.Infrastructure.Localization.Culture", b => - { - b.Navigation("Resources"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Category", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.Product", b => - { - b.Navigation("AttributeValues"); - - b.Navigation("Categories"); - - b.Navigation("LinkedProductLinks"); - - b.Navigation("Medias"); - - b.Navigation("OptionCombinations"); - - b.Navigation("OptionValues"); - - b.Navigation("PriceHistories"); - - b.Navigation("ProductLinks"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttribute", b => - { - b.Navigation("ProductTemplates"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductAttributeGroup", b => - { - b.Navigation("Attributes"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Catalog.Models.ProductTemplate", b => - { - b.Navigation("ProductAttributes"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Checkouts.Models.Checkout", b => - { - b.Navigation("CheckoutItems"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Cms.Models.Menu", b => - { - b.Navigation("MenuItems"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Cms.Models.MenuItem", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Comments.Models.Comment", b => - { - b.Navigation("Replies"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Address", b => - { - b.Navigation("UserAddresses"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Country", b => - { - b.Navigation("StatesOrProvinces"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.CustomerGroup", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Role", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.User", b => - { - b.Navigation("CustomerGroups"); - - b.Navigation("Roles"); - - b.Navigation("UserAddresses"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Core.Models.Vendor", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsCategory", b => - { - b.Navigation("NewsItems"); - }); - - modelBuilder.Entity("SimplCommerce.Module.News.Models.NewsItem", b => - { - b.Navigation("Categories"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Orders.Models.Order", b => - { - b.Navigation("Children"); - - b.Navigation("OrderItems"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CartRule", b => - { - b.Navigation("Categories"); - - b.Navigation("Coupons"); - - b.Navigation("CustomerGroups"); - - b.Navigation("Products"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Pricing.Models.CatalogRule", b => - { - b.Navigation("CustomerGroups"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Reviews.Models.Review", b => - { - b.Navigation("Replies"); - }); - - modelBuilder.Entity("SimplCommerce.Module.Shipments.Models.Shipment", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("SimplCommerce.Module.WishList.Models.WishList", b => - { - b.Navigation("Items"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs b/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs deleted file mode 100644 index 838dab06a..000000000 --- a/src/SimplCommerce.WebHost/Migrations/20250523054111_waqar.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace SimplCommerce.WebHost.Migrations -{ - /// - public partial class waqar : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/src/SimplCommerce.WebHost/Program.cs b/src/SimplCommerce.WebHost/Program.cs index 2509b1c9c..590ab3920 100644 --- a/src/SimplCommerce.WebHost/Program.cs +++ b/src/SimplCommerce.WebHost/Program.cs @@ -27,7 +27,6 @@ Configure(); app.Run(); -//hi void ConfigureService() { var connectionString = builder.Configuration.GetConnectionString("DefaultConnection"); diff --git a/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml b/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml index 5b89ad902..ab3625bac 100644 --- a/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml +++ b/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml @@ -1,5 +1,4 @@ @using System.Globalization - @@ -50,11 +49,7 @@ - - - - + diff --git a/src/SimplCommerce.WebHost/appsettings.json b/src/SimplCommerce.WebHost/appsettings.json index adb7c9a45..9e790c4ed 100644 --- a/src/SimplCommerce.WebHost/appsettings.json +++ b/src/SimplCommerce.WebHost/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "DefaultConnection": "Server=DESKTOP-8IDJ6GC\\SQLEXPRESS;Database=SimplCommerce1;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true" + "DefaultConnection": "Server=.;Database=SimplCommerce;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true" }, "Authentication" : { "Facebook" : { From bae1923021d08cf747a64fdf355e5e86a5b9622d Mon Sep 17 00:00:00 2001 From: DELL Date: Sat, 24 May 2025 19:26:29 +0530 Subject: [PATCH 4/4] Cleaned up unnecessary changes as per review on Product Feed endpoint (#1133). --- .../Views/Shared/_Layout.cshtml | 2 +- .../Views/Shared/_LoginPartial.cshtml | 9 ++--- src/SimplCommerce.WebHost/appsettings.json | 2 +- src/SimplCommerce.WebHost/tempkey.jwk | 33 ++++++++++++++++++- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml b/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml index ab3625bac..7aab7c507 100644 --- a/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml +++ b/src/SimplCommerce.WebHost/Views/Shared/_Layout.cshtml @@ -49,7 +49,7 @@ + diff --git a/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml b/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml index 4904d7df1..6944f6302 100644 --- a/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml +++ b/src/SimplCommerce.WebHost/Views/Shared/_LoginPartial.cshtml @@ -19,18 +19,13 @@ } else { - // - } diff --git a/src/SimplCommerce.WebHost/appsettings.json b/src/SimplCommerce.WebHost/appsettings.json index 9e790c4ed..6141586e6 100644 --- a/src/SimplCommerce.WebHost/appsettings.json +++ b/src/SimplCommerce.WebHost/appsettings.json @@ -1,5 +1,5 @@ { - "ConnectionStrings": { + "ConnectionStrings": { "DefaultConnection": "Server=.;Database=SimplCommerce;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true" }, "Authentication" : { diff --git a/src/SimplCommerce.WebHost/tempkey.jwk b/src/SimplCommerce.WebHost/tempkey.jwk index be1a2dde8..fc2c32c36 100644 --- a/src/SimplCommerce.WebHost/tempkey.jwk +++ b/src/SimplCommerce.WebHost/tempkey.jwk @@ -1 +1,32 @@ -{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"RLRLUJre8czi5fIc8noc_KCxdHIJDn5Y21E4VZACAYUaLVoYMkYDqNOHABxgaPAWUx4tUEc6jay5s92ModhnMNDmxd1aYt_4rEMWAoeQpLuzIXaKziqDm5YnQuBwj7MLkGfCfbv_sVtTo9QRss-KxGiNwp7bp3GC7kkC2iz_F8xYj6NUR_WtrKCvqwX5R3D7sKneZ47zfFG1nHhnqg2wv3skCIuC4_67yv32U9OtCWtdgeQNci3BoF6lZtz_fYXjKaXp3A1LWAuvCqQa4pArhk0a1LccrCcQtbW-JBuAk1j3bpQzdcH0H1FL0Bl-vbja6quW9cr9WaIzI-czUup_rQ","DP":"RaIWsXvyDqNyKrRttG9xODemYNFjr2HobOVQjkouecVI0vZDFGYtjam3kuVgdYGaTQPaJlfZyVYJVAUcXoL7kJYs-kNOkhou53iBzX4_kXNq37-asdteAb72ojNMK9XSar3qP0BMcnzQoSCouAlh_JLR-7x3uOzx_VD3l8XFTms","DQ":"TM1RZcRqUvcO88GyG37IjLFufKTVtKhNDsI8LiplJ0iA4bh9UBf4XZw1JSbXmHkM5mxx2kYhn62p2Laa4awsW_c0mN0MvoYCGIGRhUlOZr7en4iPm9B9q-ktXdJ69O9sDPhghOvLzAegW28I2HJItT6LkdpXrOG_nYtG2TsQs40","E":"AQAB","K":null,"KeyId":"0AD55BF91BD1B5683FB6C6497CDAFCD8","Kid":"0AD55BF91BD1B5683FB6C6497CDAFCD8","Kty":"RSA","N":"z4tSgQvmnUqYgy4i9Vtud9YoiNOFJSapKQF4i7cqZEP20zLjS4izoPooL7Yvhan4OeuLQbJdudQ2_qhkJp8leq9py640p3IQl-7wwwBC-uUJFn-nso-ILzh5CFDAk67_Fb1FIUUU_AkS-eVfrDARaoilPJ-oGAnYd77IhNGI8qeYxPbaTTqLm3cGUdFhNxHeUdZirDHDCb8riW2swuEKrFVkfaMQTRh2RQeszRAK_3yZ-oW-rLRMSxsdZ4dPy_Ewa6TvgPeU-3wK9jpmYO2bNE_s8EkSLu8Vp1eY6xOB1hbuwJNLDtdRNcyPXu2HhBvlJH1cRLobDNGPKOtRu_EZ6Q","Oth":null,"P":"2v2iEPXu6CyHjP-TN7may3gdStj6UlnyJxx08fFwlptiOAgI4K1ilRorUr-02nJRk-WaL-kBNMj16jyqms2laFrgZZ9H5RTPbzr4P5YFYIIS7sU_d9y3f1Fdr1BCnw_J9FVqQ6uspV30Wnrk0pW5x8VPjMzNnPgjA7Wdgrzgqgc","Q":"8p54INiWiXtMK71wFYgO8wS0IuNs7clhfzbAKMC893Tom0zQsll-TeU7a5PdJOdctteNxIW2R7WvLe8dP6L7yBIryD6oAzFkJ9QYd8eUM2X3vMNaG_zb_2S7jTB0lBso2W5o2raWZPsxOVKnqnNEbijtt6nWlAuBuy4U1fH04I8","QI":"ozeVgsQSv3ny7U9JmOLgQ5tPFLGqv4wv0lSyXGJuFftpzZEbGO1Y-JIVogB6WI-Ojff1YqqtxEdOHjfHNuZWLmV7z8gS1ByrUWLWDHfP1NaA50OvLJR-5wTXl6y9endMUxrDGr7QdZwyhscv_hfuu9JLkms377szloAbj-BmwEs","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true,"SignatureProviderObjectPoolCacheSize":32}} \ No newline at end of file +{ + "AdditionalData": {}, + "Alg": "RS256", + "Crv": null, + "D": "RLRLUJre8czi5fIc8noc_KCxdHIJDn5Y21E4VZACAYUaLVoYMkYDqNOHABxgaPAWUx4tUEc6jay5s92ModhnMNDmxd1aYt_4rEMWAoeQpLuzIXaKziqDm5YnQuBwj7MLkGfCfbv_sVtTo9QRss-KxGiNwp7bp3GC7kkC2iz_F8xYj6NUR_WtrKCvqwX5R3D7sKneZ47zfFG1nHhnqg2wv3skCIuC4_67yv32U9OtCWtdgeQNci3BoF6lZtz_fYXjKaXp3A1LWAuvCqQa4pArhk0a1LccrCcQtbW-JBuAk1j3bpQzdcH0H1FL0Bl-vbja6quW9cr9WaIzI-czUup_rQ", + "DP": "RaIWsXvyDqNyKrRttG9xODemYNFjr2HobOVQjkouecVI0vZDFGYtjam3kuVgdYGaTQPaJlfZyVYJVAUcXoL7kJYs-kNOkhou53iBzX4_kXNq37-asdteAb72ojNMK9XSar3qP0BMcnzQoSCouAlh_JLR-7x3uOzx_VD3l8XFTms", + "DQ": "TM1RZcRqUvcO88GyG37IjLFufKTVtKhNDsI8LiplJ0iA4bh9UBf4XZw1JSbXmHkM5mxx2kYhn62p2Laa4awsW_c0mN0MvoYCGIGRhUlOZr7en4iPm9B9q-ktXdJ69O9sDPhghOvLzAegW28I2HJItT6LkdpXrOG_nYtG2TsQs40", + "E": "AQAB", + "K": null, + "KeyId": "0AD55BF91BD1B5683FB6C6497CDAFCD8", + "Kid": "0AD55BF91BD1B5683FB6C6497CDAFCD8", + "Kty": "RSA", + "N": "z4tSgQvmnUqYgy4i9Vtud9YoiNOFJSapKQF4i7cqZEP20zLjS4izoPooL7Yvhan4OeuLQbJdudQ2_qhkJp8leq9py640p3IQl-7wwwBC-uUJFn-nso-ILzh5CFDAk67_Fb1FIUUU_AkS-eVfrDARaoilPJ-oGAnYd77IhNGI8qeYxPbaTTqLm3cGUdFhNxHeUdZirDHDCb8riW2swuEKrFVkfaMQTRh2RQeszRAK_3yZ-oW-rLRMSxsdZ4dPy_Ewa6TvgPeU-3wK9jpmYO2bNE_s8EkSLu8Vp1eY6xOB1hbuwJNLDtdRNcyPXu2HhBvlJH1cRLobDNGPKOtRu_EZ6Q", + "Oth": null, + "P": "2v2iEPXu6CyHjP-TN7may3gdStj6UlnyJxx08fFwlptiOAgI4K1ilRorUr-02nJRk-WaL-kBNMj16jyqms2laFrgZZ9H5RTPbzr4P5YFYIIS7sU_d9y3f1Fdr1BCnw_J9FVqQ6uspV30Wnrk0pW5x8VPjMzNnPgjA7Wdgrzgqgc", + "Q": "8p54INiWiXtMK71wFYgO8wS0IuNs7clhfzbAKMC893Tom0zQsll-TeU7a5PdJOdctteNxIW2R7WvLe8dP6L7yBIryD6oAzFkJ9QYd8eUM2X3vMNaG_zb_2S7jTB0lBso2W5o2raWZPsxOVKnqnNEbijtt6nWlAuBuy4U1fH04I8", + "QI": "ozeVgsQSv3ny7U9JmOLgQ5tPFLGqv4wv0lSyXGJuFftpzZEbGO1Y-JIVogB6WI-Ojff1YqqtxEdOHjfHNuZWLmV7z8gS1ByrUWLWDHfP1NaA50OvLJR-5wTXl6y9endMUxrDGr7QdZwyhscv_hfuu9JLkms377szloAbj-BmwEs", + "Use": null, + "X": null, + "X5t": null, + "X5tS256": null, + "X5u": null, + "Y": null, + "KeySize": 2048, + "HasPrivateKey": true, + "CryptoProviderFactory": { + "CryptoProviderCache": {}, + "CustomCryptoProvider": null, + "CacheSignatureProviders": true, + "SignatureProviderObjectPoolCacheSize": 32 + } +}