更新数据库

This commit is contained in:
yxw
2025-12-23 18:39:39 +08:00
parent 3c4144335f
commit a1516490d2
15 changed files with 187 additions and 77 deletions

View File

@@ -10,8 +10,8 @@
<Breadcrumb> <Breadcrumb>
<Breadcrumb> <Breadcrumb>
<BreadcrumbItem Href="/">管理后台</BreadcrumbItem> <BreadcrumbItem Href="/">管理后台</BreadcrumbItem>
<BreadcrumbItem Href="/admin/list">系统功能</BreadcrumbItem> <BreadcrumbItem Href="/admin/list">系统配置</BreadcrumbItem>
<BreadcrumbItem>货币管理</BreadcrumbItem> <BreadcrumbItem Href="/currency/list">货币管理</BreadcrumbItem>
</Breadcrumb> </Breadcrumb>
</Breadcrumb> </Breadcrumb>
<ChildContent> <ChildContent>

View File

@@ -70,7 +70,7 @@
<ChildContent> <ChildContent>
<Table DataSource="PagingList.Items" PageSize="100" HidePagination="true"> <Table DataSource="PagingList.Items" PageSize="100" HidePagination="true">
<Selection CheckStrictly /> <Selection CheckStrictly />
<PropertyColumn Property="c => c.Name" Title="语言" /> <PropertyColumn Property="c => c.Name" Title="名称" />
<PropertyColumn Property="c => c.CurrencyCode" Title="货币代码" /> <PropertyColumn Property="c => c.CurrencyCode" Title="货币代码" />
<PropertyColumn Property="c => c.Rate" Title="汇率" /> <PropertyColumn Property="c => c.Rate" Title="汇率" />
<PropertyColumn Property="c => c.PrimaryCurrency" Title="默认货币"> <PropertyColumn Property="c => c.PrimaryCurrency" Title="默认货币">

View File

@@ -152,7 +152,7 @@ namespace Atomx.Admin.Controllers
// } // }
//} //}
result.Data = list; result = result.IsSuccess(list);
return new JsonResult(result); return new JsonResult(result);
} }
@@ -192,17 +192,22 @@ namespace Atomx.Admin.Controllers
var validation = _validator.Validate(model); var validation = _validator.Validate(model);
if (!validation.IsValid) if (!validation.IsValid)
{ {
result.Message = ModelState.Values.First().Errors[0].ErrorMessage; result = result.IsFail(ModelState.Values.First().Errors[0].ErrorMessage);
result.Success = false;
return new JsonResult(result); return new JsonResult(result);
} }
var data = _dbContext.Currencies.SingleOrDefault(p => p.Id != model.Id && p.CurrencyCode == model.CurrencyCode);
if (data != null)
{
result = result.IsFail("该货币代码数据已经存在,请更换!");
return new JsonResult(result);
}
if (model.Id.HasValue && model.Id > 0) if (model.Id.HasValue && model.Id > 0)
{ {
var data = _dbContext.Currencies.SingleOrDefault(p => p.Id == model.Id); data = _dbContext.Currencies.SingleOrDefault(p => p.Id == model.Id);
if (data == null) if (data == null)
{ {
result.Message = "数据不存在,请更换!"; result = result.IsFail("数据不存在,请更换!");
result.Success = false;
return new JsonResult(result); return new JsonResult(result);
} }
@@ -213,27 +218,29 @@ namespace Atomx.Admin.Controllers
} }
else else
{ {
var data = new Currency() //var data = new Currency()
{ //{
Name = model.Name, // Name = model.Name,
CurrencyCode = model.CurrencyCode, // CurrencyCode = model.CurrencyCode,
DisplayLocale = model.DisplayLocale, // DisplayLocale = model.DisplayLocale,
CustomFormatting = model.CustomFormatting, // CustomFormatting = model.CustomFormatting,
Rate = (decimal)model.Rate, // Rate = (decimal)model.Rate,
DisplayOrder = model.DisplayOrder, // DisplayOrder = model.DisplayOrder,
EnableDisplay = model.Enabled, // EnableDisplay = model.Enabled,
Symbolic = "", // Symbolic = "",
Enabled = model.Enabled, // Enabled = model.Enabled,
Title = model.Name, // Title = model.Name,
EnablePay = true, // EnablePay = true,
CreateTime = DateTime.UtcNow // CreateTime = DateTime.UtcNow
}; //};
data = model.Adapt<Currency>();
data.CreateTime = DateTime.UtcNow;
_dbContext.Currencies.Add(data); _dbContext.Currencies.Add(data);
_dbContext.SaveChanges(); _dbContext.SaveChanges();
} }
result.Data = true; result = result.IsSuccess(true);
//todo 更新缓存 //todo 更新缓存

View File

@@ -19,7 +19,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 归属站点应用ID /// 归属站点应用ID
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 运行平台 /// 运行平台

View File

@@ -19,7 +19,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 归属站点应用ID /// 归属站点应用ID
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 分类类型,1内容2产品3社区 /// 分类类型,1内容2产品3社区

View File

@@ -16,7 +16,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 站点ID /// 站点ID
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 通道类型,例如通知、支付、登录等 /// 通道类型,例如通知、支付、登录等

View File

@@ -19,7 +19,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 归属站点应用ID /// 归属站点应用ID
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 发布评论用户ID /// 发布评论用户ID

View File

@@ -19,7 +19,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 站点ID /// 站点ID
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 货币名称,系统 /// 货币名称,系统

View File

@@ -19,7 +19,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 站点ID /// 站点ID
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 语言编码 /// 语言编码

View File

@@ -19,7 +19,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 归属的网站应用Id /// 归属的网站应用Id
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 配置类型,见 SettingType 枚举 /// 配置类型,见 SettingType 枚举

View File

@@ -12,9 +12,9 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 数据ID /// 数据ID
/// </summary> /// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.None)] [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key] [Key]
public long Id { get; set; } public int Id { get; set; }
/// <summary> /// <summary>
/// 网站应用类型 /// 网站应用类型

View File

@@ -16,7 +16,7 @@ namespace Atomx.Common.Entities
/// <summary> /// <summary>
/// 归属站点应用ID /// 归属站点应用ID
/// </summary> /// </summary>
public long SiteId { get; set; } public int SiteId { get; set; }
/// <summary> /// <summary>
/// 文件类型 /// 文件类型

View File

@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Atomx.Data.Migrations namespace Atomx.Data.Migrations
{ {
[DbContext(typeof(DataContext))] [DbContext(typeof(DataContext))]
[Migration("20251216011300_0.1")] [Migration("20251223083953_0.1")]
partial class _01 partial class _01
{ {
/// <inheritdoc /> /// <inheritdoc />
@@ -193,8 +193,8 @@ namespace Atomx.Data.Migrations
b.Property<int>("Platform") b.Property<int>("Platform")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Status") b.Property<int>("Status")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -329,8 +329,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(100)"); .HasColumnType("varchar(100)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<string>("Slug") b.Property<string>("Slug")
.IsRequired() .IsRequired()
@@ -373,8 +373,8 @@ namespace Atomx.Data.Migrations
b.Property<int>("Network") b.Property<int>("Network")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Status") b.Property<int>("Status")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -397,8 +397,11 @@ namespace Atomx.Data.Migrations
modelBuilder.Entity("Atomx.Common.Entities.Currency", b => modelBuilder.Entity("Atomx.Common.Entities.Currency", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer"); .HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreateTime") b.Property<DateTime>("CreateTime")
.HasColumnType("timestamptz"); .HasColumnType("timestamptz");
@@ -433,8 +436,8 @@ namespace Atomx.Data.Migrations
b.Property<decimal>("Rate") b.Property<decimal>("Rate")
.HasColumnType("decimal(16, 4)"); .HasColumnType("decimal(16, 4)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<string>("Symbolic") b.Property<string>("Symbolic")
.IsRequired() .IsRequired()
@@ -681,8 +684,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(256)"); .HasColumnType("varchar(256)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
@@ -1226,8 +1229,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(64)"); .HasColumnType("varchar(64)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -1239,8 +1242,11 @@ namespace Atomx.Data.Migrations
modelBuilder.Entity("Atomx.Common.Entities.SiteApp", b => modelBuilder.Entity("Atomx.Common.Entities.SiteApp", b =>
{ {
b.Property<long>("Id") b.Property<int>("Id")
.HasColumnType("bigint"); .ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreateTime") b.Property<DateTime>("CreateTime")
.HasColumnType("timestamptz"); .HasColumnType("timestamptz");
@@ -1333,6 +1339,40 @@ namespace Atomx.Data.Migrations
b.ToTable("SpecificationAttributeOptions"); b.ToTable("SpecificationAttributeOptions");
}); });
modelBuilder.Entity("Atomx.Common.Entities.Tag", b =>
{
b.Property<long>("Id")
.HasColumnType("bigint");
b.Property<string>("Color")
.IsRequired()
.HasColumnType("varchar(12)");
b.Property<int>("Count")
.HasColumnType("integer");
b.Property<DateTime>("CreateTime")
.HasColumnType("timestamptz");
b.Property<int>("Enabled")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property<string>("Slug")
.IsRequired()
.HasColumnType("varchar(128)");
b.Property<DateTime?>("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("Tags");
});
modelBuilder.Entity("Atomx.Common.Entities.UploadFile", b => modelBuilder.Entity("Atomx.Common.Entities.UploadFile", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
@@ -1368,8 +1408,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(128)"); .HasColumnType("varchar(128)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Size") b.Property<int>("Size")
.HasColumnType("integer"); .HasColumnType("integer");

View File

@@ -76,7 +76,7 @@ namespace Atomx.Data.Migrations
columns: table => new columns: table => new
{ {
Id = table.Column<long>(type: "bigint", nullable: false), Id = table.Column<long>(type: "bigint", nullable: false),
SiteId = table.Column<long>(type: "bigint", nullable: false), SiteId = table.Column<int>(type: "integer", nullable: false),
Platform = table.Column<int>(type: "integer", nullable: false), Platform = table.Column<int>(type: "integer", nullable: false),
AppName = table.Column<string>(type: "varchar(64)", nullable: false), AppName = table.Column<string>(type: "varchar(64)", nullable: false),
Title = table.Column<string>(type: "varchar(64)", nullable: false), Title = table.Column<string>(type: "varchar(64)", nullable: false),
@@ -121,7 +121,7 @@ namespace Atomx.Data.Migrations
columns: table => new columns: table => new
{ {
Id = table.Column<long>(type: "bigint", nullable: false), Id = table.Column<long>(type: "bigint", nullable: false),
SiteId = table.Column<long>(type: "bigint", nullable: false), SiteId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<int>(type: "integer", nullable: false), Type = table.Column<int>(type: "integer", nullable: false),
ParentId = table.Column<long>(type: "bigint", nullable: false), ParentId = table.Column<long>(type: "bigint", nullable: false),
Name = table.Column<string>(type: "varchar(25)", nullable: false), Name = table.Column<string>(type: "varchar(25)", nullable: false),
@@ -150,7 +150,7 @@ namespace Atomx.Data.Migrations
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "integer", nullable: false), Id = table.Column<int>(type: "integer", nullable: false),
SiteId = table.Column<long>(type: "bigint", nullable: false), SiteId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<int>(type: "integer", nullable: false), Type = table.Column<int>(type: "integer", nullable: false),
Network = table.Column<int>(type: "integer", nullable: false), Network = table.Column<int>(type: "integer", nullable: false),
Name = table.Column<string>(type: "varchar(20)", nullable: false), Name = table.Column<string>(type: "varchar(20)", nullable: false),
@@ -171,8 +171,9 @@ namespace Atomx.Data.Migrations
name: "Currencies", name: "Currencies",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "integer", nullable: false), Id = table.Column<int>(type: "integer", nullable: false)
SiteId = table.Column<long>(type: "bigint", nullable: false), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
SiteId = table.Column<int>(type: "integer", nullable: false),
Name = table.Column<string>(type: "varchar(50)", nullable: false), Name = table.Column<string>(type: "varchar(50)", nullable: false),
Title = table.Column<string>(type: "varchar(50)", nullable: false), Title = table.Column<string>(type: "varchar(50)", nullable: false),
CurrencyCode = table.Column<string>(type: "varchar(10)", nullable: false), CurrencyCode = table.Column<string>(type: "varchar(10)", nullable: false),
@@ -296,7 +297,7 @@ namespace Atomx.Data.Migrations
columns: table => new columns: table => new
{ {
Id = table.Column<long>(type: "bigint", nullable: false), Id = table.Column<long>(type: "bigint", nullable: false),
SiteId = table.Column<long>(type: "bigint", nullable: false), SiteId = table.Column<int>(type: "integer", nullable: false),
LanguageId = table.Column<int>(type: "integer", nullable: false), LanguageId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<int>(type: "integer", nullable: false), Type = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "varchar(64)", nullable: false), Key = table.Column<string>(type: "varchar(64)", nullable: false),
@@ -566,7 +567,7 @@ namespace Atomx.Data.Migrations
columns: table => new columns: table => new
{ {
Id = table.Column<long>(type: "bigint", nullable: false), Id = table.Column<long>(type: "bigint", nullable: false),
SiteId = table.Column<long>(type: "bigint", nullable: false), SiteId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<int>(type: "integer", nullable: false), Type = table.Column<int>(type: "integer", nullable: false),
Name = table.Column<string>(type: "varchar(64)", nullable: false), Name = table.Column<string>(type: "varchar(64)", nullable: false),
Key = table.Column<string>(type: "varchar(64)", nullable: false), Key = table.Column<string>(type: "varchar(64)", nullable: false),
@@ -581,7 +582,8 @@ namespace Atomx.Data.Migrations
name: "SiteApps", name: "SiteApps",
columns: table => new columns: table => new
{ {
Id = table.Column<long>(type: "bigint", nullable: false), Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column<int>(type: "integer", nullable: false), Type = table.Column<int>(type: "integer", nullable: false),
Name = table.Column<string>(type: "varchar(64)", nullable: false), Name = table.Column<string>(type: "varchar(64)", nullable: false),
Enabled = table.Column<bool>(type: "boolean", nullable: false), Enabled = table.Column<bool>(type: "boolean", nullable: false),
@@ -631,12 +633,30 @@ namespace Atomx.Data.Migrations
table.PrimaryKey("PK_SpecificationAttributes", x => x.Id); table.PrimaryKey("PK_SpecificationAttributes", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "Tags",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false),
Name = table.Column<string>(type: "varchar(64)", nullable: false),
Color = table.Column<string>(type: "varchar(12)", nullable: false),
Slug = table.Column<string>(type: "varchar(128)", nullable: false),
Count = table.Column<int>(type: "integer", nullable: false),
Enabled = table.Column<int>(type: "integer", nullable: false),
CreateTime = table.Column<DateTime>(type: "timestamptz", nullable: false),
UpdateTime = table.Column<DateTime>(type: "timestamptz", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Tags", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "UploadFiles", name: "UploadFiles",
columns: table => new columns: table => new
{ {
Id = table.Column<long>(type: "bigint", nullable: false), Id = table.Column<long>(type: "bigint", nullable: false),
SiteId = table.Column<long>(type: "bigint", nullable: false), SiteId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<int>(type: "integer", nullable: false), Type = table.Column<int>(type: "integer", nullable: false),
Name = table.Column<string>(type: "varchar(64)", nullable: false), Name = table.Column<string>(type: "varchar(64)", nullable: false),
Path = table.Column<string>(type: "varchar(128)", nullable: false), Path = table.Column<string>(type: "varchar(128)", nullable: false),
@@ -764,6 +784,9 @@ namespace Atomx.Data.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "SpecificationAttributes"); name: "SpecificationAttributes");
migrationBuilder.DropTable(
name: "Tags");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "UploadFiles"); name: "UploadFiles");

View File

@@ -190,8 +190,8 @@ namespace Atomx.Data.Migrations
b.Property<int>("Platform") b.Property<int>("Platform")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Status") b.Property<int>("Status")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -326,8 +326,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(100)"); .HasColumnType("varchar(100)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<string>("Slug") b.Property<string>("Slug")
.IsRequired() .IsRequired()
@@ -370,8 +370,8 @@ namespace Atomx.Data.Migrations
b.Property<int>("Network") b.Property<int>("Network")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Status") b.Property<int>("Status")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -394,8 +394,11 @@ namespace Atomx.Data.Migrations
modelBuilder.Entity("Atomx.Common.Entities.Currency", b => modelBuilder.Entity("Atomx.Common.Entities.Currency", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer"); .HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreateTime") b.Property<DateTime>("CreateTime")
.HasColumnType("timestamptz"); .HasColumnType("timestamptz");
@@ -430,8 +433,8 @@ namespace Atomx.Data.Migrations
b.Property<decimal>("Rate") b.Property<decimal>("Rate")
.HasColumnType("decimal(16, 4)"); .HasColumnType("decimal(16, 4)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<string>("Symbolic") b.Property<string>("Symbolic")
.IsRequired() .IsRequired()
@@ -678,8 +681,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(256)"); .HasColumnType("varchar(256)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
@@ -1223,8 +1226,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(64)"); .HasColumnType("varchar(64)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Type") b.Property<int>("Type")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -1236,8 +1239,11 @@ namespace Atomx.Data.Migrations
modelBuilder.Entity("Atomx.Common.Entities.SiteApp", b => modelBuilder.Entity("Atomx.Common.Entities.SiteApp", b =>
{ {
b.Property<long>("Id") b.Property<int>("Id")
.HasColumnType("bigint"); .ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreateTime") b.Property<DateTime>("CreateTime")
.HasColumnType("timestamptz"); .HasColumnType("timestamptz");
@@ -1330,6 +1336,40 @@ namespace Atomx.Data.Migrations
b.ToTable("SpecificationAttributeOptions"); b.ToTable("SpecificationAttributeOptions");
}); });
modelBuilder.Entity("Atomx.Common.Entities.Tag", b =>
{
b.Property<long>("Id")
.HasColumnType("bigint");
b.Property<string>("Color")
.IsRequired()
.HasColumnType("varchar(12)");
b.Property<int>("Count")
.HasColumnType("integer");
b.Property<DateTime>("CreateTime")
.HasColumnType("timestamptz");
b.Property<int>("Enabled")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(64)");
b.Property<string>("Slug")
.IsRequired()
.HasColumnType("varchar(128)");
b.Property<DateTime?>("UpdateTime")
.HasColumnType("timestamptz");
b.HasKey("Id");
b.ToTable("Tags");
});
modelBuilder.Entity("Atomx.Common.Entities.UploadFile", b => modelBuilder.Entity("Atomx.Common.Entities.UploadFile", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
@@ -1365,8 +1405,8 @@ namespace Atomx.Data.Migrations
.IsRequired() .IsRequired()
.HasColumnType("varchar(128)"); .HasColumnType("varchar(128)");
b.Property<long>("SiteId") b.Property<int>("SiteId")
.HasColumnType("bigint"); .HasColumnType("integer");
b.Property<int>("Size") b.Property<int>("Size")
.HasColumnType("integer"); .HasColumnType("integer");