Started implementing server share backend. Redesigned server authorization for api calls. Refactored controller names for servers. Moved some responses to correct namespace
This commit is contained in:
@@ -10,6 +10,7 @@ public class Server
|
||||
public List<Allocation> Allocations { get; set; } = new();
|
||||
public List<ServerVariable> Variables { get; set; } = new();
|
||||
public List<ServerBackup> Backups { get; set; } = new();
|
||||
public List<ServerShare> Shares { get; set; } = new();
|
||||
|
||||
// Meta
|
||||
public string Name { get; set; }
|
||||
|
||||
20
MoonlightServers.ApiServer/Database/Entities/ServerShare.cs
Normal file
20
MoonlightServers.ApiServer/Database/Entities/ServerShare.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MoonlightServers.ApiServer.Database.Entities;
|
||||
|
||||
public class ServerShare
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
public Server Server { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string Permissions { get; set; }
|
||||
|
||||
[Column(TypeName="timestamp with time zone")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[Column(TypeName="timestamp with time zone")]
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user