Unfiltered object is now a struct.

This commit is contained in:
2024-11-28 14:24:33 +01:00
parent eedca27a11
commit 3d8f903d30
14 changed files with 149 additions and 77 deletions
+7
View File
@@ -0,0 +1,7 @@
namespace Models.Model.Backend;
public enum DbType
{
Unfiltered,
Filtered,
}
+1 -1
View File
@@ -2,7 +2,7 @@ namespace Models.Model.Backend;
public class Filtered
{
public string Ip { get; set; } = "";
public Ip Ip { get; set; }
public string Title1 { get; set; } = "";
public string Title2 { get; set; } = "";
public string Description1 { get; set; } = "";
+17
View File
@@ -0,0 +1,17 @@
namespace Models.Model.Backend;
public struct Ip
{
public int Ip1 { get; set; }
public int Ip2 { get; set; }
public int Ip3 { get; set; }
public int Ip4 { get; set; }
public override string ToString()
{
return $"{Ip1}.{Ip2}.{Ip3}.{Ip4}";
}
}
+2 -1
View File
@@ -2,8 +2,9 @@ namespace Models.Model.Backend;
public class QueueItem
{
public Unfiltered? Unfiltered { get; init; }
public Unfiltered Unfiltered { get; init; }
public Filtered? Filtered { get; init; }
public ScannerResumeObject? ResumeObject { get; init; }
public Operations Operations { get; init; }
public DbType DbType { get; init; }
}
+7 -9
View File
@@ -1,16 +1,14 @@
namespace Models.Model.Backend;
public class Unfiltered
public struct Unfiltered
{
public int Id { get; set; }
public string Ip { get; set; } = "";
public int ResponseCode { get; init; }
public Ip Ip { get; set; }
public int Port1 { get; set; }
public int Port2 { get; set; }
public int Filtered { get; set; }
public bool Filtered { get; set; }
}