refactor: 移除租户审核领取模型
This commit is contained in:
@@ -88,10 +88,6 @@ public sealed class TakeoutAppDbContext(
|
||||
/// </summary>
|
||||
public DbSet<TenantVerificationProfile> TenantVerificationProfiles => Set<TenantVerificationProfile>();
|
||||
/// <summary>
|
||||
/// 租户审核领取记录。
|
||||
/// </summary>
|
||||
public DbSet<TenantReviewClaim> TenantReviewClaims => Set<TenantReviewClaim>();
|
||||
/// <summary>
|
||||
/// 配额包定义。
|
||||
/// </summary>
|
||||
public DbSet<QuotaPackage> QuotaPackages => Set<QuotaPackage>();
|
||||
@@ -398,7 +394,6 @@ public sealed class TakeoutAppDbContext(
|
||||
ConfigureTenantAnnouncement(modelBuilder.Entity<TenantAnnouncement>());
|
||||
ConfigureTenantAnnouncementRead(modelBuilder.Entity<TenantAnnouncementRead>());
|
||||
ConfigureTenantVerificationProfile(modelBuilder.Entity<TenantVerificationProfile>());
|
||||
ConfigureTenantReviewClaim(modelBuilder.Entity<TenantReviewClaim>());
|
||||
ConfigureQuotaPackage(modelBuilder.Entity<QuotaPackage>());
|
||||
ConfigureTenantQuotaPackagePurchase(modelBuilder.Entity<TenantQuotaPackagePurchase>());
|
||||
ConfigureMerchantDocument(modelBuilder.Entity<MerchantDocument>());
|
||||
@@ -469,6 +464,7 @@ public sealed class TakeoutAppDbContext(
|
||||
ConfigureMetricSnapshot(modelBuilder.Entity<MetricSnapshot>());
|
||||
ConfigureMetricAlertRule(modelBuilder.Entity<MetricAlertRule>());
|
||||
|
||||
// 3. 应用多租户全局查询过滤器
|
||||
ApplyTenantQueryFilters(modelBuilder);
|
||||
}
|
||||
|
||||
@@ -509,21 +505,7 @@ public sealed class TakeoutAppDbContext(
|
||||
builder.HasIndex(x => x.TenantId).IsUnique();
|
||||
}
|
||||
|
||||
private static void ConfigureTenantReviewClaim(EntityTypeBuilder<TenantReviewClaim> builder)
|
||||
{
|
||||
builder.ToTable("tenant_review_claims");
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.Property(x => x.TenantId).IsRequired();
|
||||
builder.Property(x => x.ClaimedBy).IsRequired();
|
||||
builder.Property(x => x.ClaimedByName).HasMaxLength(64).IsRequired();
|
||||
builder.Property(x => x.ClaimedAt).IsRequired();
|
||||
builder.Property(x => x.ReleasedAt);
|
||||
builder.HasIndex(x => x.TenantId);
|
||||
builder.HasIndex(x => x.ClaimedBy);
|
||||
builder.HasIndex(x => x.TenantId).IsUnique().HasFilter("\"ReleasedAt\" IS NULL AND \"DeletedAt\" IS NULL");
|
||||
}
|
||||
|
||||
|
||||
// 租户订阅历史映射
|
||||
private static void ConfigureTenantSubscriptionHistory(EntityTypeBuilder<TenantSubscriptionHistory> builder)
|
||||
{
|
||||
builder.ToTable("tenant_subscription_histories");
|
||||
|
||||
Reference in New Issue
Block a user