//
using System;
using Atomx.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Atomx.Data.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20251214094758_0.1")]
partial class _01
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Atomx.Common.Entities.Address", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("AddressDetails")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("City")
.IsRequired()
.HasColumnType("varchar(100)");
b.Property("CityId")
.HasColumnType("bigint");
b.Property("Company")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Count")
.HasColumnType("integer");
b.Property("Country")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("CountryId")
.HasColumnType("bigint");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Email")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("FullAddress")
.IsRequired()
.HasColumnType("varchar(1024)");
b.Property("IsDelete")
.HasColumnType("boolean");
b.Property("IsVirtual")
.HasColumnType("boolean");
b.Property("Latitude")
.HasColumnType("decimal(10,6)");
b.Property("Longitude")
.HasColumnType("decimal(10,6)");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(128)");
b.Property("Phone")
.IsRequired()
.HasColumnType("varchar(20)");
b.Property("PostalCode")
.IsRequired()
.HasColumnType("varchar(15)");
b.Property("Province")
.IsRequired()
.HasColumnType("varchar(100)");
b.Property("ProvinceId")
.HasColumnType("bigint");
b.Property("Region")
.IsRequired()
.HasColumnType("varchar(100)");
b.Property("RegionId")
.HasColumnType("bigint");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("UserId")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("Addresses");
});
modelBuilder.Entity("Atomx.Common.Entities.Admin", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("Avatar")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Email")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("LastIp")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("LastLogin")
.HasColumnType("timestamptz");
b.Property("LockoutEndTime")
.HasColumnType("timestamptz");
b.Property("LoginCount")
.HasColumnType("integer");
b.Property("Mobile")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("Password")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("RoleId")
.HasColumnType("integer");
b.Property("Status")
.HasColumnType("integer");
b.Property("TimeOffset")
.IsRequired()
.HasColumnType("varchar(4)");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("Username")
.IsRequired()
.HasColumnType("varchar(64)");
b.HasKey("Id");
b.ToTable("Admins");
});
modelBuilder.Entity("Atomx.Common.Entities.AppVersion", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("AppName")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("Content")
.IsRequired()
.HasColumnType("text");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Platform")
.HasColumnType("integer");
b.Property("SiteId")
.HasColumnType("bigint");
b.Property("Status")
.HasColumnType("integer");
b.Property("Title")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("Version")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("VersionDate")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("VersionState")
.HasColumnType("integer");
b.Property("VersionX")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("VersionY")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("VersionZ")
.IsRequired()
.HasColumnType("varchar(64)");
b.HasKey("Id");
b.ToTable("AppVersions");
});
modelBuilder.Entity("Atomx.Common.Entities.Area", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("AllowShipping")
.HasColumnType("boolean");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("Initial")
.IsRequired()
.HasColumnType("varchar(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("NumericISOCode")
.HasColumnType("integer");
b.Property("ParentId")
.HasColumnType("bigint");
b.Property("ThreeLetterISOCode")
.IsRequired()
.HasColumnType("varchar(3)");
b.Property("TwoLetterISOCode")
.IsRequired()
.HasColumnType("varchar(2)");
b.HasKey("Id");
b.ToTable("Areas");
});
modelBuilder.Entity("Atomx.Common.Entities.Category", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("Banner")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Count")
.HasColumnType("integer");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Depth")
.HasColumnType("integer");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("FilterAttributes")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Image")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("IsNode")
.HasColumnType("boolean");
b.Property("MetaDescription")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("MetaKeywords")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(25)");
b.Property("ParentId")
.HasColumnType("bigint");
b.Property("Path")
.IsRequired()
.HasColumnType("varchar(100)");
b.Property("SiteId")
.HasColumnType("bigint");
b.Property("Slug")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("Type")
.HasColumnType("integer");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("Categories");
});
modelBuilder.Entity("Atomx.Common.Entities.Currency", b =>
{
b.Property("Id")
.HasColumnType("integer");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("CurrencyCode")
.IsRequired()
.HasColumnType("varchar(10)");
b.Property("CustomFormatting")
.IsRequired()
.HasColumnType("varchar(20)");
b.Property("DisplayLocale")
.IsRequired()
.HasColumnType("varchar(15)");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("EnableDisplay")
.HasColumnType("boolean");
b.Property("EnablePay")
.HasColumnType("boolean");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("Rate")
.HasColumnType("decimal(16, 4)");
b.Property("Symbolic")
.IsRequired()
.HasColumnType("varchar(8)");
b.Property("Title")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("Currencies");
});
modelBuilder.Entity("Atomx.Common.Entities.CurrencyChannelRelation", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("CurrencyId")
.HasColumnType("integer");
b.Property("EndTime")
.HasColumnType("integer");
b.Property("Extended")
.IsRequired()
.HasColumnType("text");
b.Property("PayChannelId")
.HasColumnType("integer");
b.Property("Rate")
.HasColumnType("numeric");
b.Property("StartTime")
.HasColumnType("integer");
b.Property("Status")
.HasColumnType("integer");
b.Property("TimeZone")
.HasColumnType("integer");
b.Property("Title")
.IsRequired()
.HasColumnType("text");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("CurrencyChannelRelations");
});
modelBuilder.Entity("Atomx.Common.Entities.Language", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Culture")
.IsRequired()
.HasColumnType("varchar(25)");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("FlagImage")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("ResourceVersion")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Title")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("Languages");
});
modelBuilder.Entity("Atomx.Common.Entities.LocaleResource", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("LanguageId")
.HasColumnType("integer");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("Value")
.IsRequired()
.HasColumnType("varchar(1000)");
b.HasKey("Id");
b.ToTable("LocaleResources");
});
modelBuilder.Entity("Atomx.Common.Entities.LocalizedProperty", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("EntityId")
.HasColumnType("bigint");
b.Property("Key")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("LanguageNumber")
.HasColumnType("integer");
b.Property("Type")
.HasColumnType("integer");
b.Property("Value")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("LocalizedProperties");
});
modelBuilder.Entity("Atomx.Common.Entities.Menu", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("Code")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Depth")
.HasColumnType("integer");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("Icon")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("IsLink")
.HasColumnType("boolean");
b.Property("Key")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("ParentId")
.HasColumnType("bigint");
b.Property("Path")
.IsRequired()
.HasColumnType("varchar(100)");
b.Property("Type")
.HasColumnType("integer");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("Url")
.IsRequired()
.HasColumnType("varchar(256)");
b.HasKey("Id");
b.ToTable("Menus");
});
modelBuilder.Entity("Atomx.Common.Entities.MessageTemplate", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("Body")
.IsRequired()
.HasColumnType("text");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("Key")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Title")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Type")
.HasColumnType("integer");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("MessageTemplates");
});
modelBuilder.Entity("Atomx.Common.Entities.PaymentChannel", b =>
{
b.Property("Id")
.HasColumnType("integer");
b.Property("Account")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Config")
.IsRequired()
.HasColumnType("text");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Description")
.IsRequired()
.HasColumnType("varchar(512)");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(20)");
b.Property("Network")
.HasColumnType("integer");
b.Property("Status")
.HasColumnType("integer");
b.Property("Title")
.IsRequired()
.HasColumnType("varchar(20)");
b.Property("Type")
.HasColumnType("integer");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("PaymentChannels");
});
modelBuilder.Entity("Atomx.Common.Entities.Permission", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("Category")
.IsRequired()
.HasColumnType("varchar(128)");
b.Property("Description")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(128)");
b.HasKey("Id");
b.ToTable("Permissions");
});
modelBuilder.Entity("Atomx.Common.Entities.Product", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("CategoryId")
.HasColumnType("bigint");
b.Property("CategoryPath")
.HasColumnType("varchar(200)");
b.Property("CorporationId")
.HasColumnType("bigint");
b.Property("CorporationStaffId")
.HasColumnType("bigint");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("Deleted")
.HasColumnType("boolean");
b.Property("DeletedTime")
.HasColumnType("timestamptz");
b.Property("Description")
.HasColumnType("varchar(256)");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Extended")
.IsRequired()
.HasColumnType("text");
b.Property("Feature")
.HasColumnType("varchar(256)");
b.Property("Image")
.HasColumnType("varchar(256)");
b.Property("InventoryMethod")
.HasColumnType("integer");
b.Property("ManufacturerId")
.HasColumnType("bigint");
b.Property("MarketPrice")
.HasColumnType("decimal(18,4)");
b.Property("MaxWeight")
.HasColumnType("decimal(6,2)");
b.Property("MinWeight")
.HasColumnType("decimal(6,2)");
b.Property("Photos")
.HasColumnType("text");
b.Property("PictureCount")
.HasColumnType("integer");
b.Property("Price")
.HasColumnType("decimal(18,4)");
b.Property("ProductTypeId")
.HasColumnType("bigint");
b.Property("ReviewStatus")
.HasColumnType("integer");
b.Property("SIN")
.HasColumnType("varchar(20)");
b.Property("SalesQuantity")
.HasColumnType("integer");
b.Property("SkuPrices")
.HasColumnType("text");
b.Property("SpecificationJson")
.HasColumnType("text");
b.Property("Status")
.HasColumnType("integer");
b.Property("StockQuantity")
.HasColumnType("integer");
b.Property("StoreId")
.HasColumnType("bigint");
b.Property("Title")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("Weight")
.HasColumnType("decimal(6,2)");
b.HasKey("Id");
b.ToTable("Products");
});
modelBuilder.Entity("Atomx.Common.Entities.ProductAttribute", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("CategoryId")
.HasColumnType("bigint");
b.Property("ControlType")
.HasColumnType("integer");
b.Property("Count")
.HasColumnType("integer");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("IsRequired")
.HasColumnType("boolean");
b.Property("Name")
.IsRequired()
.HasColumnType("varchar(50)");
b.Property("ParentId")
.HasColumnType("bigint");
b.Property("Status")
.HasColumnType("integer");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("WeightIsRequired")
.HasColumnType("boolean");
b.Property("WeightUnit")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("ProductAttributes");
});
modelBuilder.Entity("Atomx.Common.Entities.ProductAttributeCombination", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("AttributesJson")
.IsRequired()
.HasColumnType("text");
b.Property("CorporationId")
.HasColumnType("bigint");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("ManufacturerId")
.HasColumnType("bigint");
b.Property("Mark")
.HasColumnType("integer");
b.Property("MarketPrice")
.HasColumnType("decimal(18,4)");
b.Property("Note")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property("Price")
.HasColumnType("decimal(18,4)");
b.Property("ProcessCharge")
.HasColumnType("decimal(18,4)");
b.Property("ProcessCost")
.HasColumnType("decimal(18,4)");
b.Property("ProductId")
.HasColumnType("bigint");
b.Property("SalesQuantity")
.HasColumnType("integer");
b.Property("SkuNumber")
.IsRequired()
.HasColumnType("varchar(20)");
b.Property("StockQuantity")
.HasColumnType("integer");
b.Property("Surcharge")
.HasColumnType("decimal(18,4)");
b.Property("SurchargeCost")
.HasColumnType("decimal(18,4)");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("Weight")
.HasColumnType("decimal(18,4)");
b.Property("WeightUnit")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("ProductAttributeCombinations");
});
modelBuilder.Entity("Atomx.Common.Entities.ProductAttributeOption", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("AttributeId")
.HasColumnType("bigint");
b.Property("Count")
.HasColumnType("integer");
b.Property("CreateTime")
.HasColumnType("timestamptz");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Standard")
.HasColumnType("boolean");
b.Property("Status")
.HasColumnType("integer");
b.Property("UpdateTime")
.HasColumnType("timestamptz");
b.Property("Value")
.IsRequired()
.HasColumnType("varchar(50)");
b.HasKey("Id");
b.ToTable("ProductAttributeOptions");
});
modelBuilder.Entity("Atomx.Common.Entities.ProductAttributeRelation", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("AttributeId")
.HasColumnType("bigint");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Image")
.HasColumnType("boolean");
b.Property("ProductId")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("ProductAttributeRelations");
});
modelBuilder.Entity("Atomx.Common.Entities.ProductAttributeValue", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("DisplayOrder")
.HasColumnType("integer");
b.Property("Image")
.IsRequired()
.HasColumnType("varchar(256)");
b.Property