完成门店管理后端接口与任务

This commit is contained in:
2026-01-01 07:26:14 +08:00
parent dc9f6136d6
commit fc55003d3d
131 changed files with 15333 additions and 201 deletions

View File

@@ -4828,6 +4828,10 @@ namespace TakeoutSaaS.Infrastructure.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<DateTime?>("ActivatedAt")
.HasColumnType("timestamp with time zone")
.HasComment("审核通过时间。");
b.Property<string>("Address")
.HasMaxLength(256)
.HasColumnType("character varying(256)")
@@ -4838,6 +4842,10 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("character varying(512)")
.HasComment("门店公告。");
b.Property<int>("AuditStatus")
.HasColumnType("integer")
.HasComment("审核状态。");
b.Property<string>("BusinessHours")
.HasMaxLength(256)
.HasColumnType("character varying(256)")
@@ -4853,11 +4861,28 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("character varying(50)")
.HasComment("门店营业执照号(主体不一致模式使用)。");
b.Property<int>("BusinessStatus")
.HasColumnType("integer")
.HasComment("经营状态。");
b.Property<long?>("CategoryId")
.HasColumnType("bigint")
.HasComment("行业类目 ID。");
b.Property<string>("City")
.HasMaxLength(64)
.HasColumnType("character varying(64)")
.HasComment("所在城市。");
b.Property<int?>("ClosureReason")
.HasColumnType("integer")
.HasComment("歇业原因。");
b.Property<string>("ClosureReasonText")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("歇业原因补充说明。");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(32)
@@ -4902,6 +4927,15 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("character varying(64)")
.HasComment("区县信息。");
b.Property<string>("ForceCloseReason")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("强制关闭原因。");
b.Property<DateTime?>("ForceClosedAt")
.HasColumnType("timestamp with time zone")
.HasComment("强制关闭时间。");
b.Property<double?>("Latitude")
.HasColumnType("double precision")
.HasComment("纬度。");
@@ -4930,6 +4964,10 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("character varying(128)")
.HasComment("门店名称。");
b.Property<int>("OwnershipType")
.HasColumnType("integer")
.HasComment("主体类型。");
b.Property<string>("Phone")
.HasMaxLength(32)
.HasColumnType("character varying(32)")
@@ -4945,10 +4983,24 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("character varying(500)")
.HasComment("门店注册地址(主体不一致模式使用)。");
b.Property<string>("RejectionReason")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("审核驳回原因。");
b.Property<string>("SignboardImageUrl")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("门头招牌图 URL。");
b.Property<int>("Status")
.HasColumnType("integer")
.HasComment("门店当前运营状态。");
b.Property<DateTime?>("SubmittedAt")
.HasColumnType("timestamp with time zone")
.HasComment("提交审核时间。");
b.Property<bool>("SupportsDelivery")
.HasColumnType("boolean")
.HasComment("是否支持配送。");
@@ -4987,21 +5039,119 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.HasKey("Id");
b.HasIndex("Longitude", "Latitude")
.HasFilter("\"Longitude\" IS NOT NULL AND \"Latitude\" IS NOT NULL");
b.HasIndex("MerchantId", "BusinessLicenseNumber")
.IsUnique()
.HasFilter("\"BusinessLicenseNumber\" IS NOT NULL AND \"Status\" <> 3");
b.HasIndex("TenantId", "AuditStatus");
b.HasIndex("TenantId", "BusinessStatus");
b.HasIndex("TenantId", "Code")
.IsUnique();
b.HasIndex("TenantId", "MerchantId");
b.HasIndex("TenantId", "OwnershipType");
b.ToTable("stores", null, t =>
{
t.HasComment("门店信息,承载营业配置与能力。");
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreAuditRecord", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasComment("实体唯一标识。");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<int>("Action")
.HasColumnType("integer")
.HasComment("操作类型。");
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<int>("NewStatus")
.HasColumnType("integer")
.HasComment("操作后状态。");
b.Property<long?>("OperatorId")
.HasColumnType("bigint")
.HasComment("操作人 ID。");
b.Property<string>("OperatorName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasComment("操作人名称。");
b.Property<int?>("PreviousStatus")
.HasColumnType("integer")
.HasComment("操作前状态。");
b.Property<string>("RejectionReason")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("驳回理由文本。");
b.Property<long?>("RejectionReasonId")
.HasColumnType("bigint")
.HasComment("驳回理由 ID。");
b.Property<string>("Remarks")
.HasMaxLength(1000)
.HasColumnType("character varying(1000)")
.HasComment("备注。");
b.Property<long>("StoreId")
.HasColumnType("bigint")
.HasComment("门店标识。");
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("CreatedAt");
b.HasIndex("TenantId", "StoreId");
b.ToTable("store_audit_records", null, t =>
{
t.HasComment("门店审核记录。");
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreBusinessHour", b =>
{
b.Property<long>("Id")
@@ -5235,6 +5385,84 @@ namespace TakeoutSaaS.Infrastructure.Migrations
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreFee", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasComment("实体唯一标识。");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<decimal>("BaseDeliveryFee")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasComment("基础配送费(元)。");
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<decimal>("FixedPackagingFee")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasComment("固定打包费(总计模式有效)。");
b.Property<decimal?>("FreeDeliveryThreshold")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasComment("免配送费门槛。");
b.Property<decimal>("MinimumOrderAmount")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasComment("起送费(元)。");
b.Property<int>("PackagingFeeMode")
.HasColumnType("integer")
.HasComment("打包费模式。");
b.Property<long>("StoreId")
.HasColumnType("bigint")
.HasComment("门店标识。");
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");
b.HasIndex("TenantId", "StoreId")
.IsUnique();
b.ToTable("store_fees", null, t =>
{
t.HasComment("门店费用配置。");
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreHoliday", b =>
{
b.Property<long>("Id")
@@ -5473,6 +5701,89 @@ namespace TakeoutSaaS.Infrastructure.Migrations
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreQualification", 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>("DocumentNumber")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasComment("证照编号。");
b.Property<DateTime?>("ExpiresAt")
.HasColumnType("timestamp with time zone")
.HasComment("到期日期。");
b.Property<string>("FileUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasComment("证照文件 URL。");
b.Property<DateTime?>("IssuedAt")
.HasColumnType("timestamp with time zone")
.HasComment("签发日期。");
b.Property<int>("QualificationType")
.HasColumnType("integer")
.HasComment("资质类型。");
b.Property<int>("SortOrder")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(100)
.HasComment("排序值。");
b.Property<long>("StoreId")
.HasColumnType("bigint")
.HasComment("门店标识。");
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("ExpiresAt")
.HasFilter("\"ExpiresAt\" IS NOT NULL");
b.HasIndex("TenantId", "StoreId");
b.ToTable("store_qualifications", null, t =>
{
t.HasComment("门店资质证照。");
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreTable", b =>
{
b.Property<long>("Id")