Added database entities, started with node crud
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Requests.Admin.Nodes;
|
||||
|
||||
public class CreateNodeRequest
|
||||
{
|
||||
[Required(ErrorMessage = "You need to provide a name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "You need to provide a fqdn")]
|
||||
public string Fqdn { get; set; }
|
||||
|
||||
[Range(1, 65535, ErrorMessage = "You need to provide a valid port")]
|
||||
public int ApiPort { get; set; } = 8080;
|
||||
|
||||
public bool SslEnabled { get; set; } = false;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Requests.Admin.Nodes;
|
||||
|
||||
public class UpdateNodeRequest
|
||||
{
|
||||
[Required(ErrorMessage = "You need to provide a name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "You need to provide a fqdn")]
|
||||
public string Fqdn { get; set; }
|
||||
|
||||
[Range(1, 65535, ErrorMessage = "You need to provide a valid port")]
|
||||
public int ApiPort { get; set; } = 8080;
|
||||
|
||||
public bool SslEnabled { get; set; } = false;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace MoonlightServers.Shared.Http.Responses.Admin.Nodes;
|
||||
|
||||
public class DetailNodeResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Fqdn { get; set; }
|
||||
public int ApiPort { get; set; }
|
||||
public bool SslEnabled { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user