docs: 标记自提档期完成

This commit is contained in:
2025-12-04 11:51:09 +08:00
parent 2022d1c377
commit 7d6b7d8760
29 changed files with 1165 additions and 2 deletions

View File

@@ -62,6 +62,8 @@ public sealed class TakeoutAppDbContext(
public DbSet<StoreTableArea> StoreTableAreas => Set<StoreTableArea>();
public DbSet<StoreTable> StoreTables => Set<StoreTable>();
public DbSet<StoreEmployeeShift> StoreEmployeeShifts => Set<StoreEmployeeShift>();
public DbSet<StorePickupSetting> StorePickupSettings => Set<StorePickupSetting>();
public DbSet<StorePickupSlot> StorePickupSlots => Set<StorePickupSlot>();
public DbSet<ProductCategory> ProductCategories => Set<ProductCategory>();
public DbSet<Product> Products => Set<Product>();
@@ -159,6 +161,8 @@ public sealed class TakeoutAppDbContext(
ConfigureStoreTableArea(modelBuilder.Entity<StoreTableArea>());
ConfigureStoreTable(modelBuilder.Entity<StoreTable>());
ConfigureStoreEmployeeShift(modelBuilder.Entity<StoreEmployeeShift>());
ConfigureStorePickupSetting(modelBuilder.Entity<StorePickupSetting>());
ConfigureStorePickupSlot(modelBuilder.Entity<StorePickupSlot>());
ConfigureProductCategory(modelBuilder.Entity<ProductCategory>());
ConfigureProduct(modelBuilder.Entity<Product>());
ConfigureProductAttributeGroup(modelBuilder.Entity<ProductAttributeGroup>());
@@ -622,6 +626,28 @@ public sealed class TakeoutAppDbContext(
builder.HasIndex(x => new { x.TenantId, x.StoreId, x.ShiftDate, x.StaffId }).IsUnique();
}
private static void ConfigureStorePickupSetting(EntityTypeBuilder<StorePickupSetting> builder)
{
builder.ToTable("store_pickup_settings");
builder.HasKey(x => x.Id);
builder.Property(x => x.StoreId).IsRequired();
builder.Property(x => x.DefaultCutoffMinutes).HasDefaultValue(30);
builder.Property(x => x.RowVersion).IsRowVersion();
builder.HasIndex(x => new { x.TenantId, x.StoreId }).IsUnique();
}
private static void ConfigureStorePickupSlot(EntityTypeBuilder<StorePickupSlot> builder)
{
builder.ToTable("store_pickup_slots");
builder.HasKey(x => x.Id);
builder.Property(x => x.StoreId).IsRequired();
builder.Property(x => x.Name).HasMaxLength(64).IsRequired();
builder.Property(x => x.Weekdays).HasMaxLength(32).IsRequired();
builder.Property(x => x.CutoffMinutes).HasDefaultValue(30);
builder.Property(x => x.RowVersion).IsRowVersion();
builder.HasIndex(x => new { x.TenantId, x.StoreId, x.Name });
}
private static void ConfigureProductAttributeGroup(EntityTypeBuilder<ProductAttributeGroup> builder)
{
builder.ToTable("product_attribute_groups");