Moved share permission parsing to jsonb implementation of ef core. Improved auth handling for shares

This commit is contained in:
2025-06-06 14:15:32 +02:00
parent 1ec4450040
commit cfed1aefde
12 changed files with 176 additions and 70 deletions

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations.Schema;
using MoonlightServers.ApiServer.Models;
namespace MoonlightServers.ApiServer.Database.Entities;
@@ -9,8 +10,7 @@ public class ServerShare
public int UserId { get; set; }
public Server Server { get; set; }
[Column(TypeName = "jsonb")]
public string Permissions { get; set; }
public ServerShareContent Content { get; set; } = new();
[Column(TypeName="timestamp with time zone")]
public DateTime CreatedAt { get; set; }