feat(product): add product schedule management api
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 46s

This commit is contained in:
2026-02-21 11:46:55 +08:00
parent ad65ef3bf6
commit d41f69045f
21 changed files with 9760 additions and 0 deletions

View File

@@ -4709,6 +4709,144 @@ namespace TakeoutSaaS.Infrastructure.Migrations
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSchedule", 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<TimeSpan>("EndTime")
.HasColumnType("interval")
.HasComment("结束时间。");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean")
.HasComment("是否启用。");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)")
.HasComment("规则名称。");
b.Property<TimeSpan>("StartTime")
.HasColumnType("interval")
.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.Property<int>("WeekDaysMask")
.HasColumnType("integer")
.HasComment("星期位掩码(周一到周日)。");
b.HasKey("Id");
b.HasIndex("TenantId", "StoreId", "IsEnabled");
b.HasIndex("TenantId", "StoreId", "Name")
.IsUnique();
b.ToTable("product_schedules", null, t =>
{
t.HasComment("商品时段规则(门店维度)。");
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductScheduleProduct", 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<long>("ProductId")
.HasColumnType("bigint")
.HasComment("商品 ID。");
b.Property<long>("ScheduleId")
.HasColumnType("bigint")
.HasComment("时段规则 ID。");
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", "StoreId", "ProductId");
b.HasIndex("TenantId", "StoreId", "ScheduleId", "ProductId")
.IsUnique();
b.ToTable("product_schedule_products", null, t =>
{
t.HasComment("时段规则与商品关联关系。");
});
});
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSku", b =>
{
b.Property<long>("Id")