Add version field to star entity. Implemented a lot of the star crud

This commit is contained in:
2024-12-06 15:03:28 +01:00
parent 1520d0b2b1
commit de1b54d652
27 changed files with 1448 additions and 194 deletions

View File

@@ -1,10 +1,9 @@
using System.ComponentModel.DataAnnotations;
using MoonlightServers.Shared.Enums;
using MoonlightServers.Shared.Interfaces;
namespace MoonlightServers.Shared.Http.Requests.Admin.StarVariables;
public class CreateStarVariableRequest : IStarVariable
public class CreateStarVariableRequest
{
[Required(ErrorMessage = "You need to specify a variable name")]
public string Name { get; set; }

View File

@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
using MoonlightServers.Shared.Enums;
namespace MoonlightServers.Shared.Http.Requests.Admin.StarVariables;
public class UpdateStarVariableRequest
{
[Required(ErrorMessage = "You need to specify a variable name")]
public string Name { get; set; }
[Required(ErrorMessage = "You need to specify a variable description", AllowEmptyStrings = true)]
public string Description { get; set; } = "";
[Required(ErrorMessage = "You need to specify a variable key")]
public string Key { get; set; }
[Required(ErrorMessage = "You need to specify a variable default value", AllowEmptyStrings = true)]
public string DefaultValue { get; set; } = "";
public bool AllowViewing { get; set; }
public bool AllowEditing { get; set; }
public StarVariableType Type { get; set; } = StarVariableType.Text;
public string? Filter { get; set; } = null;
}