Added database entities, started with node crud

This commit is contained in:
Masu-Baumgartner
2024-08-30 15:25:34 +02:00
parent c4a4fbd221
commit fba40d6689
25 changed files with 1887 additions and 5 deletions

View File

@@ -1,8 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Moonlight.ApiServer.App.Helpers.Database;
using MoonlightServers.ApiServer.Database.Entities;
namespace MoonlightServers.ApiServer.Database;
public class ServersContext : DatabaseContext
{
public override string Prefix => "Servers";
public DbSet<Allocation> Allocations { get; set; }
public DbSet<Backup> Backups { get; set; }
public DbSet<Network> Networks { get; set; }
public DbSet<Node> Nodes { get; set; }
public DbSet<Server> Servers { get; set; }
public DbSet<ServerVariable> ServerVariables { get; set; }
public DbSet<Star> Stars { get; set; }
public DbSet<StarDockerImage> StarDockerImages { get; set; }
public DbSet<StarFolder> StarFolders { get; set; }
public DbSet<StarVariable> StarVariables { get; set; }
}