Implemented db entities. Adjusted template default values

This commit is contained in:
2024-12-05 16:49:47 +01:00
parent 3392407890
commit 3b77b3df1e
21 changed files with 1385 additions and 75 deletions

View File

@@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore;
using Moonlight.ApiServer.Configuration;
using Moonlight.ApiServer.Helpers;
using MoonlightServers.ApiServer.Database.Entities;
namespace MoonlightServers.ApiServer.Database;
public class ServersDataContext : DatabaseContext
{
public override string Prefix { get; } = "Servers";
public DbSet<Allocation> Allocations { get; set; }
public DbSet<Node> Nodes { get; set; }
public DbSet<Server> Servers { get; set; }
public DbSet<ServerBackup> ServerBackups { get; set; }
public DbSet<ServerVariable> ServerVariables { get; set; }
public DbSet<Star> Stars { get; set; }
public DbSet<StarDockerImage> StarDockerImages { get; set; }
public DbSet<StarVariable> StarVariables { get; set; }
public ServersDataContext(AppConfiguration configuration) : base(configuration)
{
}
}