Add version field to star entity. Implemented a lot of the star crud
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user