♻️ Extract the Storage service to DysonNetwork.Drive microservice
This commit is contained in:
59
DysonNetwork.Sphere/Data/AppDatabase.cs
Normal file
59
DysonNetwork.Sphere/Data/AppDatabase.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using DysonNetwork.Common.Models;
|
||||
using DysonNetwork.Sphere.Realm;
|
||||
using DysonNetwork.Sphere.Sticker;
|
||||
using DysonNetwork.Sphere.Connection;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace DysonNetwork.Sphere.Data;
|
||||
|
||||
public class AppDatabase : DbContext
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
public AppDatabase(DbContextOptions<AppDatabase> options, IConfiguration configuration)
|
||||
: base(options)
|
||||
{
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
public DbSet<CloudFile> Files { get; set; } = null!;
|
||||
public DbSet<CloudFileReference> FileReferences { get; set; } = null!;
|
||||
public DbSet<Common.Models.Publisher> Publishers { get; set; } = null!;
|
||||
public DbSet<PublisherFeature> PublisherFeatures { get; set; } = null!;
|
||||
public DbSet<Common.Models.Post> Posts { get; set; } = null!;
|
||||
public DbSet<PostReaction> PostReactions { get; set; } = null!;
|
||||
public DbSet<PostTag> PostTags { get; set; } = null!;
|
||||
public DbSet<PostCategory> PostCategories { get; set; } = null!;
|
||||
public DbSet<PostCollection> PostCollections { get; set; } = null!;
|
||||
public DbSet<Common.Models.Realm> Realms { get; set; } = null!;
|
||||
public DbSet<RealmMember> RealmMembers { get; set; } = null!;
|
||||
public DbSet<Tag> Tags { get; set; } = null!;
|
||||
public DbSet<RealmTag> RealmTags { get; set; } = null!;
|
||||
public DbSet<ChatRoom> ChatRooms { get; set; } = null!;
|
||||
public DbSet<ChatMember> ChatMembers { get; set; } = null!;
|
||||
public DbSet<Message> ChatMessages { get; set; } = null!;
|
||||
public DbSet<RealtimeCall> ChatRealtimeCall { get; set; } = null!;
|
||||
public DbSet<MessageReaction> ChatReactions { get; set; } = null!;
|
||||
public DbSet<Sticker.Sticker> Stickers { get; set; } = null!;
|
||||
public DbSet<StickerPack> StickerPacks { get; set; } = null!;
|
||||
public DbSet<Common.Models.Wallet> Wallets { get; set; } = null!;
|
||||
public DbSet<WalletPocket> WalletPockets { get; set; } = null!;
|
||||
public DbSet<Order> PaymentOrders { get; set; } = null!;
|
||||
public DbSet<Transaction> PaymentTransactions { get; set; } = null!;
|
||||
public DbSet<CustomApp> CustomApps { get; set; } = null!;
|
||||
public DbSet<CustomAppSecret> CustomAppSecrets { get; set; } = null!;
|
||||
public DbSet<Subscription> WalletSubscriptions { get; set; } = null!;
|
||||
// TODO: Fix Connection type - no Connection class found in DysonNetwork.Sphere.Connection
|
||||
// public DbSet<Connection> Connections { get; set; } = null!;
|
||||
// public DbSet<Connection> Followers { get; set; } = null!;
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
// Configure the database schema and relationships here
|
||||
// This will be moved from the original AppDatabase class
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user