1+ using Microsoft . EntityFrameworkCore ;
2+ using Microsoft . EntityFrameworkCore . Infrastructure ;
3+
4+ using Nullinside . Api . Model . Ddl ;
5+
6+ namespace Nullinside . Api . Model ;
7+
8+ /// <summary>
9+ /// Represents the nullinside database.
10+ /// </summary>
11+ public interface INullinsideContext {
12+ /// <summary>
13+ /// The users table which contains all of the users that have ever authenticated with the site.
14+ /// </summary>
15+ public DbSet < User > Users { get ; set ; }
16+
17+ /// <summary>
18+ /// The user's roles table which contains all of the "roles" the user has in the application.
19+ /// </summary>
20+ public DbSet < UserRole > UserRoles { get ; set ; }
21+
22+ /// <summary>
23+ /// The docker deployments that are configurable in the applications.
24+ /// </summary>
25+ public DbSet < DockerDeployments > DockerDeployments { get ; set ; }
26+
27+ /// <summary>
28+ /// The docker deployments that are configurable in the applications.
29+ /// </summary>
30+ public DbSet < TwitchUser > TwitchUser { get ; set ; }
31+
32+ /// <summary>
33+ /// The docker deployments that are configurable in the applications.
34+ /// </summary>
35+ public DbSet < TwitchBan > TwitchBan { get ; set ; }
36+
37+ /// <summary>
38+ /// The feature toggles.
39+ /// </summary>
40+ public DbSet < FeatureToggle > FeatureToggle { get ; set ; }
41+
42+ /// <summary>
43+ /// The twitch user configuration.
44+ /// </summary>
45+ public DbSet < TwitchUserConfig > TwitchUserConfig { get ; set ; }
46+
47+ /// <summary>
48+ /// The twitch logs of users banned outside the bot.
49+ /// </summary>
50+ public DbSet < TwitchUserBannedOutsideOfBotLogs > TwitchUserBannedOutsideOfBotLogs { get ; set ; }
51+
52+ /// <summary>
53+ /// The twitch logs of the user's chat.
54+ /// </summary>
55+ public DbSet < TwitchUserChatLogs > TwitchUserChatLogs { get ; set ; }
56+
57+ /// <summary>
58+ /// Provides access to database related information and operations for this context.
59+ /// </summary>
60+ public DatabaseFacade Database { get ; }
61+
62+ /// <summary>
63+ /// Saves all changes made in this context to the database.
64+ /// </summary>
65+ /// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for the task to complete.</param>
66+ /// <returns>
67+ /// A task that represents the asynchronous save operation. The task result contains the
68+ /// number of state entries written to the database.
69+ /// </returns>
70+ public Task < int > SaveChangesAsync ( CancellationToken cancellationToken = default ) ;
71+ }
0 commit comments