feat: 商品SKU支持异步保存与软禁用替换策略
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 56s

This commit is contained in:
2026-02-25 09:23:15 +08:00
parent c2a6cf7b1e
commit 5fcc1e1484
14 changed files with 9897 additions and 100 deletions

View File

@@ -5138,6 +5138,8 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.HasKey("Id");
b.HasIndex("TenantId", "ProductId");
b.HasIndex("TenantId", "SkuCode")
.IsUnique();
@@ -5147,6 +5149,108 @@ namespace TakeoutSaaS.Infrastructure.Migrations
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSkuSaveJob", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasComment("实体唯一标识。");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasComment("创建时间UTC。");
b.Property<long?>("CreatedBy")
.HasColumnType("bigint")
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
b.Property<DateTime?>("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasComment("软删除时间UTC未删除时为 null。");
b.Property<long?>("DeletedBy")
.HasColumnType("bigint")
.HasComment("删除人用户标识(软删除),未删除时为 null。");
b.Property<string>("ErrorMessage")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)")
.HasComment("失败摘要。");
b.Property<int>("FailedCount")
.HasColumnType("integer")
.HasComment("失败条数。");
b.Property<DateTime?>("FinishedAt")
.HasColumnType("timestamp with time zone")
.HasComment("完成时间UTC。");
b.Property<string>("HangfireJobId")
.HasMaxLength(64)
.HasColumnType("character varying(64)")
.HasComment("Hangfire 任务 ID。");
b.Property<string>("Mode")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("character varying(16)")
.HasComment("任务模式(当前固定 replace。");
b.Property<string>("PayloadJson")
.IsRequired()
.HasColumnType("text")
.HasComment("任务请求负载 JSON 快照。");
b.Property<long>("ProductId")
.HasColumnType("bigint")
.HasComment("所属商品 ID。");
b.Property<int>("ProgressProcessed")
.HasColumnType("integer")
.HasComment("已处理数。");
b.Property<int>("ProgressTotal")
.HasColumnType("integer")
.HasComment("总处理数。");
b.Property<DateTime?>("StartedAt")
.HasColumnType("timestamp with time zone")
.HasComment("开始执行时间UTC。");
b.Property<int>("Status")
.HasColumnType("integer")
.HasComment("任务状态。");
b.Property<long>("StoreId")
.HasColumnType("bigint")
.HasComment("所属门店 ID。");
b.Property<long>("TenantId")
.HasColumnType("bigint")
.HasComment("所属租户 ID。");
b.Property<DateTime?>("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasComment("最近一次更新时间UTC从未更新时为 null。");
b.Property<long?>("UpdatedBy")
.HasColumnType("bigint")
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
b.HasKey("Id");
b.HasIndex("TenantId", "ProductId", "CreatedAt");
b.HasIndex("TenantId", "Status", "CreatedAt");
b.ToTable("product_sku_save_jobs", null, t =>
{
t.HasComment("商品 SKU 异步保存任务。");
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSpecTemplate", b =>
{
b.Property<long>("Id")