diff --git a/src/Client/Client.cs b/src/Client/Client.cs index de12483..10ff796 100644 --- a/src/Client/Client.cs +++ b/src/Client/Client.cs @@ -4,10 +4,10 @@ using System.Text; using System.Threading.Tasks; using System.Web; using System.Text.Json; -using Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Configuration; using System.Reflection.Metadata.Ecma335; +using Server.Models; namespace Client; diff --git a/src/Models/SearchdomainResults.cs b/src/Models/SearchdomainResults.cs deleted file mode 100644 index 9d1f6b3..0000000 --- a/src/Models/SearchdomainResults.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Text.Json.Serialization; - -namespace Models -{ - public class SearchdomainListResults - { - [JsonPropertyName("Searchdomains")] // Otherwise the api returns {"searchdomains": [...]} and the client requires {"Searchdomains": [...]} - public required List Searchdomains { get; set; } - } - - public class SearchdomainCreateResults - { - [JsonPropertyName("Success")] - public required bool Success { get; set; } - - [JsonPropertyName("Id")] - public int? Id { get; set; } - } - - public class SearchdomainUpdateResults - { - [JsonPropertyName("Success")] - public required bool Success { get; set; } - } - - public class SearchdomainDeleteResults - { - [JsonPropertyName("Success")] - public required bool Success { get; set; } - [JsonPropertyName("DeletedEntities")] - public required int DeletedEntities { get; set; } - } - -} diff --git a/src/Server/Controllers/EntityController.cs b/src/Server/Controllers/EntityController.cs index 153e5b3..b8e6c6b 100644 --- a/src/Server/Controllers/EntityController.cs +++ b/src/Server/Controllers/EntityController.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using System.Text.Json; -using Models; using System.Text.Json.Nodes; +using Server.Models; namespace Server.Controllers; [ApiController] diff --git a/src/Server/Controllers/SearchdomainController.cs b/src/Server/Controllers/SearchdomainController.cs index 0286935..e67bf81 100644 --- a/src/Server/Controllers/SearchdomainController.cs +++ b/src/Server/Controllers/SearchdomainController.cs @@ -1,5 +1,5 @@ using Microsoft.AspNetCore.Mvc; -using Models; +using Server.Models; namespace Server.Controllers; diff --git a/src/Models/EntityResults.cs b/src/Server/Models/EntityResults.cs similarity index 98% rename from src/Models/EntityResults.cs rename to src/Server/Models/EntityResults.cs index 20a702d..3bf0636 100644 --- a/src/Models/EntityResults.cs +++ b/src/Server/Models/EntityResults.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Models; +namespace Server.Models; public class EntityQueryResults diff --git a/src/Server/Models/SearchdomainResults.cs b/src/Server/Models/SearchdomainResults.cs new file mode 100644 index 0000000..f870e66 --- /dev/null +++ b/src/Server/Models/SearchdomainResults.cs @@ -0,0 +1,32 @@ +using System.Text.Json.Serialization; + +namespace Server.Models; + +public class SearchdomainListResults +{ + [JsonPropertyName("Searchdomains")] // Otherwise the api returns {"searchdomains": [...]} and the client requires {"Searchdomains": [...]} + public required List Searchdomains { get; set; } +} + +public class SearchdomainCreateResults +{ + [JsonPropertyName("Success")] + public required bool Success { get; set; } + + [JsonPropertyName("Id")] + public int? Id { get; set; } +} + +public class SearchdomainUpdateResults +{ + [JsonPropertyName("Success")] + public required bool Success { get; set; } +} + +public class SearchdomainDeleteResults +{ + [JsonPropertyName("Success")] + public required bool Success { get; set; } + [JsonPropertyName("DeletedEntities")] + public required int DeletedEntities { get; set; } +}