mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-04-13 00:59:03 +02:00
Co-authored-by: Kieran <kieran@harkin.me> Reviewed-on: https://git.v0l.io/Kieran/void.cat/pulls/65
32 lines
1020 B
C#
32 lines
1020 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using VoidCat.Database;
|
|
using File = VoidCat.Database.File;
|
|
|
|
namespace VoidCat.Services;
|
|
|
|
public class VoidContext : DbContext
|
|
{
|
|
public VoidContext()
|
|
{
|
|
}
|
|
|
|
public VoidContext(DbContextOptions<VoidContext> ctx) : base(ctx)
|
|
{
|
|
}
|
|
|
|
public DbSet<User> Users => Set<User>();
|
|
public DbSet<File> Files => Set<File>();
|
|
public DbSet<VirusScanResult> VirusScanResults => Set<VirusScanResult>();
|
|
public DbSet<Paywall> Paywalls => Set<Paywall>();
|
|
public DbSet<PaywallOrder> PaywallOrders => Set<PaywallOrder>();
|
|
public DbSet<UserAuthToken> UserAuthTokens => Set<UserAuthToken>();
|
|
public DbSet<ApiKey> ApiKeys => Set<ApiKey>();
|
|
public DbSet<EmailVerification> EmailVerifications => Set<EmailVerification>();
|
|
public DbSet<UserFile> UserFiles => Set<UserFile>();
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.ApplyConfigurationsFromAssembly(typeof(VoidContext).Assembly);
|
|
}
|
|
}
|