feat: add commerce persistence

This commit is contained in:
xiong
2026-07-26 05:36:03 +08:00
parent aa000c63aa
commit fc8e04ebd6
7 changed files with 12766 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Tiku.Domain.Catalog;
using Tiku.Domain.Commerce;
using Tiku.Domain.Common;
using Tiku.Domain.Content;
using Tiku.Domain.Identity;
@@ -76,6 +77,20 @@ public sealed class TikuDbContext(DbContextOptions<TikuDbContext> options) : DbC
public DbSet<PracticeSessionReportSection> PracticeSessionReportSections => Set<PracticeSessionReportSection>();
public DbSet<DashboardDailyStat> DashboardDailyStats => Set<DashboardDailyStat>();
public DbSet<RevenueDailyStat> RevenueDailyStats => Set<RevenueDailyStat>();
public DbSet<Product> Products => Set<Product>();
public DbSet<SvipPlan> SvipPlans => Set<SvipPlan>();
public DbSet<Order> Orders => Set<Order>();
public DbSet<OrderItem> OrderItems => Set<OrderItem>();
public DbSet<Payment> Payments => Set<Payment>();
public DbSet<PaymentEvent> PaymentEvents => Set<PaymentEvent>();
public DbSet<Entitlement> Entitlements => Set<Entitlement>();
public DbSet<CodeBatch> CodeBatches => Set<CodeBatch>();
public DbSet<ActivationCode> ActivationCodes => Set<ActivationCode>();
public DbSet<Coupon> Coupons => Set<Coupon>();
public DbSet<CouponRedemption> CouponRedemptions => Set<CouponRedemption>();
public DbSet<TenantPaymentAccount> TenantPaymentAccounts => Set<TenantPaymentAccount>();
public DbSet<TenantSubscription> TenantSubscriptions => Set<TenantSubscription>();
public DbSet<TenantUsageRecord> TenantUsageRecords => Set<TenantUsageRecord>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{