dbd90ee52a
Player-service play-session tracker (floor + 3-bucket classify), SharePopover share tracker with debounce, sendBeacon interop, proxied rate-limited POST api/event/{play,share}, append-only event logs + incremental play_counter with server-side release resolution. Migration authored, not applied. No anonId, no read surface.
37 lines
1.4 KiB
C#
37 lines
1.4 KiB
C#
using DeepDrftModels.Entities;
|
|
using DeepDrftData.Data.Configurations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DeepDrftData.Data;
|
|
|
|
public class DeepDrftContext : DbContext
|
|
{
|
|
public DeepDrftContext(DbContextOptions<DeepDrftContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
public DbSet<TrackEntity> Tracks { get; set; }
|
|
public DbSet<ReleaseEntity> Releases { get; set; }
|
|
public DbSet<SessionMetadata> SessionMetadata { get; set; }
|
|
public DbSet<MixMetadata> MixMetadata { get; set; }
|
|
|
|
// Phase 16 anonymous telemetry: append-only event logs + incremental play rollup. All SQL — the
|
|
// FileDatabase vault is not involved.
|
|
public DbSet<PlayEvent> PlayEvents { get; set; }
|
|
public DbSet<ShareEvent> ShareEvents { get; set; }
|
|
public DbSet<PlayCounter> PlayCounters { get; set; }
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
modelBuilder.ApplyConfiguration(new TrackConfiguration());
|
|
modelBuilder.ApplyConfiguration(new ReleaseConfiguration());
|
|
modelBuilder.ApplyConfiguration(new SessionMetadataConfiguration());
|
|
modelBuilder.ApplyConfiguration(new MixMetadataConfiguration());
|
|
modelBuilder.ApplyConfiguration(new PlayEventConfiguration());
|
|
modelBuilder.ApplyConfiguration(new ShareEventConfiguration());
|
|
modelBuilder.ApplyConfiguration(new PlayCounterConfiguration());
|
|
}
|
|
}
|