mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
feat: Add new API controllers for progression events, room consumables, currencies, earnings distributions, screen share reports, subscription seasons, and UGC purchasables
- Implemented ProgressionEventsController to handle progression event retrieval and active events. - Created RoomConsumablesController for listing and purchasing room consumables. - Developed RoomCurrenciesController for managing room currencies, including creation, updates, and balance retrieval. - Added RoomEarningsDistributionsController to fetch earnings distribution data for rooms. - Introduced ScreenShareReportsController for reporting screen share incidents. - Established SubscriptionSeasonsController to provide current subscription season details and rewards. - Launched UgcPurchasablesController for managing user-generated content purchasables, including bulk operations. - Added new data entities for customization and room economy, including custom avatar items, room currencies, and UGC purchasables.
This commit is contained in:
@@ -74,6 +74,14 @@ public class DorkNetDbContext(DbContextOptions<DorkNetDbContext> options) : DbCo
|
||||
public DbSet<ClubSubscriptionEntity> ClubSubscriptions => Set<ClubSubscriptionEntity>();
|
||||
public DbSet<SignupCodeEntity> SignupCodes => Set<SignupCodeEntity>();
|
||||
public DbSet<PendingDeviceEntity> PendingDevices => Set<PendingDeviceEntity>();
|
||||
public DbSet<CustomAvatarItemEntity> CustomAvatarItems => Set<CustomAvatarItemEntity>();
|
||||
public DbSet<CustomAvatarItemOwnershipEntity> CustomAvatarItemOwnership => Set<CustomAvatarItemOwnershipEntity>();
|
||||
public DbSet<ItemWishlistEntity> ItemWishlists => Set<ItemWishlistEntity>();
|
||||
public DbSet<KeepsakeEntity> Keepsakes => Set<KeepsakeEntity>();
|
||||
public DbSet<RoomCurrencyEntity> RoomCurrencies => Set<RoomCurrencyEntity>();
|
||||
public DbSet<RoomCurrencyBalanceEntity> RoomCurrencyBalances => Set<RoomCurrencyBalanceEntity>();
|
||||
public DbSet<RoomCurrencyPurchaseOfferEntity> RoomCurrencyPurchaseOffers => Set<RoomCurrencyPurchaseOfferEntity>();
|
||||
public DbSet<UgcPurchasableEntity> UgcPurchasables => Set<UgcPurchasableEntity>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -679,5 +687,64 @@ public class DorkNetDbContext(DbContextOptions<DorkNetDbContext> options) : DbCo
|
||||
e.HasKey(c => new { c.RoomId, c.Channel });
|
||||
e.HasIndex(c => c.RoomId);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CustomAvatarItemEntity>(e =>
|
||||
{
|
||||
e.HasKey(i => i.Id);
|
||||
e.HasIndex(i => i.PublicId).IsUnique();
|
||||
e.HasIndex(i => i.CreatorPlayerId);
|
||||
e.HasIndex(i => i.IsPublic);
|
||||
e.HasIndex(i => i.IsFeatured);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CustomAvatarItemOwnershipEntity>(e =>
|
||||
{
|
||||
e.HasKey(o => o.Id);
|
||||
e.HasIndex(o => new { o.PlayerId, o.CustomAvatarItemId }).IsUnique();
|
||||
e.HasIndex(o => o.CustomAvatarItemId);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ItemWishlistEntity>(e =>
|
||||
{
|
||||
e.HasKey(w => w.Id);
|
||||
e.HasIndex(w => new { w.PlayerId, w.ItemKey, w.ItemType }).IsUnique();
|
||||
});
|
||||
|
||||
modelBuilder.Entity<KeepsakeEntity>(e =>
|
||||
{
|
||||
e.HasKey(k => k.Id);
|
||||
e.HasIndex(k => k.PlayerId);
|
||||
e.HasIndex(k => new { k.PlayerId, k.EventKey });
|
||||
});
|
||||
|
||||
modelBuilder.Entity<RoomCurrencyEntity>(e =>
|
||||
{
|
||||
e.HasKey(c => c.Id);
|
||||
e.HasIndex(c => c.PublicId).IsUnique();
|
||||
e.HasIndex(c => c.RoomId);
|
||||
e.HasIndex(c => c.CreatorPlayerId);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<RoomCurrencyBalanceEntity>(e =>
|
||||
{
|
||||
e.HasKey(b => b.Id);
|
||||
e.HasIndex(b => new { b.PlayerId, b.RoomCurrencyId }).IsUnique();
|
||||
e.HasIndex(b => b.RoomCurrencyId);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<RoomCurrencyPurchaseOfferEntity>(e =>
|
||||
{
|
||||
e.HasKey(o => o.Id);
|
||||
e.HasIndex(o => o.PublicId).IsUnique();
|
||||
e.HasIndex(o => o.RoomCurrencyId);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<UgcPurchasableEntity>(e =>
|
||||
{
|
||||
e.HasKey(p => p.Id);
|
||||
e.HasIndex(p => p.PublicId).IsUnique();
|
||||
e.HasIndex(p => p.RoomId);
|
||||
e.HasIndex(p => p.CreatorPlayerId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user