syntax updates

This commit is contained in:
Kevin Kai Berthold 2023-09-22 22:16:56 +02:00
parent 283fa1abc2
commit 1e05d4576d
75 changed files with 3821 additions and 3905 deletions

View file

@ -3,60 +3,59 @@ using MongoDB.Bson.Serialization.Attributes;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class AgentEntity
{
[BsonIgnoreExtraElements]
public class AgentEntity
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("serial"), Required]
public string? Serial { get; set; }
[BsonElement("hostname")]
public string? Hostname { get; set; }
[BsonElement("version"), BsonRepresentation(BsonType.String)]
public Version? Version { get; set; }
[BsonElement("endpoint"), BsonRepresentation(BsonType.String)]
public string? Endpoint { get; set; }
[BsonElement("connected")]
public DateTime? Connected { get; set; }
[BsonElement("activity")]
public DateTime? Activity { get; set; }
[BsonElement("bytes_sent")]
public long SentBytes { get; set; }
[BsonElement("bytes_received")]
public long ReceivedBytes { get; set; }
[BsonElement("packets_sent")]
public long SentPackets { get; set; }
[BsonElement("packets_received")]
public long ReceivedPackets { get; set; }
//[BsonElement("latency")]
//public TimeSpan? Latency { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostEntity>? Hosts { get; set; }
public bool GetOnlineState()
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("serial"), Required]
public string? Serial { get; set; }
[BsonElement("hostname")]
public string? Hostname { get; set; }
[BsonElement("version"), BsonRepresentation(BsonType.String)]
public Version? Version { get; set; }
[BsonElement("endpoint"), BsonRepresentation(BsonType.String)]
public string? Endpoint { get; set; }
[BsonElement("connected")]
public DateTime? Connected { get; set; }
[BsonElement("activity")]
public DateTime? Activity { get; set; }
[BsonElement("bytes_sent")]
public long SentBytes { get; set; }
[BsonElement("bytes_received")]
public long ReceivedBytes { get; set; }
[BsonElement("packets_sent")]
public long SentPackets { get; set; }
[BsonElement("packets_received")]
public long ReceivedPackets { get; set; }
//[BsonElement("latency")]
//public TimeSpan? Latency { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostEntity>? Hosts { get; set; }
public bool GetOnlineState()
{
if (Activity is null) return false;
return Activity.Value.ToLocalTime().Add(TimeSpan.FromSeconds(60)).Subtract(DateTime.Now).Seconds > 0;
}
if (Activity is null) return false;
return Activity.Value.ToLocalTime().Add(TimeSpan.FromSeconds(60)).Subtract(DateTime.Now).Seconds > 0;
}
}

View file

@ -2,36 +2,35 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class AgentLogEntity
{
[BsonIgnoreExtraElements]
public class AgentLogEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_agent"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("agent")]
public string? Agent { get; set; }
[BsonElement("_agent"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("agent")]
public string? Agent { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("eventid")]
public string? EventId { get; set; }
[BsonElement("eventid")]
public string? EventId { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("source")]
public string? Source { get; set; }
[BsonElement("source")]
public string? Source { get; set; }
[BsonElement("category")]
public string? Category { get; set; }
[BsonElement("category")]
public string? Category { get; set; }
[BsonElement("message")]
public string? Message { get; set; }
[BsonElement("message")]
public string? Message { get; set; }
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
}
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
}

View file

@ -3,27 +3,26 @@ using MongoDB.Bson.Serialization.Attributes;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class CustomerEntity
{
[BsonIgnoreExtraElements]
public class CustomerEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("name"), Required]
public string? Name { get; set; }
[BsonElement("name"), Required]
public string? Name { get; set; }
[BsonElement("tag")]
public string? Tag { get; set; }
[BsonElement("tag")]
public string? Tag { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostEntity>? Hosts { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<HostEntity>? Hosts { get; set; }
}

View file

@ -3,36 +3,35 @@ using MongoDB.Bson.Serialization.Attributes;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostEntity
{
[BsonIgnoreExtraElements]
public class HostEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_customer"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("customer")]
public string? Customer { get; set; }
[BsonElement("_customer"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("customer")]
public string? Customer { get; set; }
[BsonElement("_agent"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("agent")]
public string? Agent { get; set; }
[BsonElement("_agent"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("agent")]
public string? Agent { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("name"), Required]
public string? Name { get; set; }
[BsonElement("name"), Required]
public string? Name { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<CustomerEntity>? Customers { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<CustomerEntity>? Customers { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<AgentEntity>? Agents { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<AgentEntity>? Agents { get; set; }
}

View file

@ -2,39 +2,38 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostApplicationEntity
{
[BsonIgnoreExtraElements]
public class HostApplicationEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("architecture")]
public string? Architecture { get; set; }
[BsonElement("architecture")]
public string? Architecture { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("installdate")]
public DateTime? InstallDate { get; set; }
}
[BsonElement("installdate")]
public DateTime? InstallDate { get; set; }
}

View file

@ -2,51 +2,50 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostDriveEntity
{
[BsonIgnoreExtraElements]
public class HostDriveEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("firmware")]
public string? Firmware { get; set; }
[BsonElement("firmware")]
public string? Firmware { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("pnp")]
public string? Pnp { get; set; }
}
[BsonElement("pnp")]
public string? Pnp { get; set; }
}

View file

@ -2,187 +2,186 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostHypervisorVirtualMaschineEntity
{
[BsonIgnoreExtraElements]
public class HostHypervisorVirtualMaschineEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("notes")]
public string? Notes { get; set; }
[BsonElement("notes")]
public string? Notes { get; set; }
[BsonElement("enabled")]
public string? Enabled { get; set; }
[BsonElement("enabled")]
public string? Enabled { get; set; }
[BsonElement("enabled_default")]
public string? EnabledDefault { get; set; }
[BsonElement("enabled_default")]
public string? EnabledDefault { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("ontime")]
public ulong? OnTime { get; set; }
[BsonElement("ontime")]
public ulong? OnTime { get; set; }
[BsonElement("replication_state")]
public string? ReplicationState { get; set; }
[BsonElement("replication_state")]
public string? ReplicationState { get; set; }
[BsonElement("replication_health")]
public string? ReplicationHealth { get; set; }
[BsonElement("replication_health")]
public string? ReplicationHealth { get; set; }
[BsonElement("version_configuration")]
public string? ConfigurationVersion { get; set; }
[BsonElement("version_configuration")]
public string? ConfigurationVersion { get; set; }
[BsonElement("version_integrated_services")]
public string? IntegrationServicesVersionState { get; set; }
[BsonElement("version_integrated_services")]
public string? IntegrationServicesVersionState { get; set; }
[BsonElement("processid")]
public uint? ProcessId { get; set; }
[BsonElement("processid")]
public uint? ProcessId { get; set; }
[BsonElement("processor_count")]
public uint? NumberOfProcessors { get; set; }
[BsonElement("processor_count")]
public uint? NumberOfProcessors { get; set; }
[BsonElement("processor_load")]
public uint? ProcessorLoad { get; set; }
[BsonElement("processor_load")]
public uint? ProcessorLoad { get; set; }
[BsonElement("memory_available")]
public int? MemoryAvailable { get; set; }
[BsonElement("memory_available")]
public int? MemoryAvailable { get; set; }
[BsonElement("memory_usage")]
public ulong? MemoryUsage { get; set; }
[BsonElement("memory_usage")]
public ulong? MemoryUsage { get; set; }
[BsonElement("installdate")]
public DateTime? InstallDate { get; set; }
[BsonElement("installdate")]
public DateTime? InstallDate { get; set; }
[BsonElement("configuration_changed")]
public DateTime? TimeOfLastConfigurationChange { get; set; }
[BsonElement("configuration_changed")]
public DateTime? TimeOfLastConfigurationChange { get; set; }
[BsonElement("state_changed")]
public DateTime? TimeOfLastStateChange { get; set; }
[BsonElement("state_changed")]
public DateTime? TimeOfLastStateChange { get; set; }
[BsonElement("replication_last")]
public DateTime? LastReplicationTime { get; set; }
[BsonElement("replication_last")]
public DateTime? LastReplicationTime { get; set; }
[BsonElement("guest_os")]
public string? Os { get; set; }
[BsonElement("guest_os")]
public string? Os { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostHypervisorVirtualMaschineConfigEntity>? Configs { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<HostHypervisorVirtualMaschineConfigEntity>? Configs { get; set; }
}
[BsonIgnoreExtraElements]
public class HostHypervisorVirtualMaschineConfigEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostHypervisorVirtualMaschineConfigEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("virtualmaschine"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("virtualmaschine")]
public string? VirtualMaschine { get; set; }
[BsonElement("virtualmaschine"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("virtualmaschine")]
public string? VirtualMaschine { get; set; }
[BsonElement("batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("parentid")]
public string? ParentId { get; set; }
[BsonElement("parentid")]
public string? ParentId { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("notes")]
public string? Notes { get; set; }
[BsonElement("notes")]
public string? Notes { get; set; }
[BsonElement("creationtime")]
public DateTime? CreationTime { get; set; }
[BsonElement("creationtime")]
public DateTime? CreationTime { get; set; }
[BsonElement("generation")]
public string? Generation { get; set; }
[BsonElement("generation")]
public string? Generation { get; set; }
[BsonElement("architecture")]
public string? Architecture { get; set; }
[BsonElement("architecture")]
public string? Architecture { get; set; }
[BsonElement("secureboot")]
public bool? SecureBootEnabled { get; set; }
[BsonElement("secureboot")]
public bool? SecureBootEnabled { get; set; }
[BsonElement("automatic_snapshot")]
public bool? IsAutomaticSnapshot { get; set; }
[BsonElement("automatic_snapshot")]
public bool? IsAutomaticSnapshot { get; set; }
[BsonElement("action_start")]
public string? AutomaticStartupAction { get; set; }
[BsonElement("action_start")]
public string? AutomaticStartupAction { get; set; }
[BsonElement("action_shutdown")]
public string? AutomaticShutdownAction { get; set; }
[BsonElement("action_shutdown")]
public string? AutomaticShutdownAction { get; set; }
[BsonElement("action_recovery")]
public string? AutomaticRecoveryAction { get; set; }
[BsonElement("action_recovery")]
public string? AutomaticRecoveryAction { get; set; }
[BsonElement("auto_snapshots")]
public bool? AutomaticSnapshotsEnabled { get; set; }
[BsonElement("auto_snapshots")]
public bool? AutomaticSnapshotsEnabled { get; set; }
[BsonElement("serial_mainboard")]
public string? BaseBoardSerialNumber { get; set; }
[BsonElement("serial_mainboard")]
public string? BaseBoardSerialNumber { get; set; }
[BsonElement("serial_bios")]
public string? BIOSSerialNumber { get; set; }
[BsonElement("serial_bios")]
public string? BIOSSerialNumber { get; set; }
[BsonElement("bios_guid")]
public string? BIOSGUID { get; set; }
[BsonElement("bios_guid")]
public string? BIOSGUID { get; set; }
[BsonElement("data_root")]
public string? ConfigurationDataRoot { get; set; }
[BsonElement("data_root")]
public string? ConfigurationDataRoot { get; set; }
[BsonElement("file")]
public string? ConfigurationFile { get; set; }
[BsonElement("file")]
public string? ConfigurationFile { get; set; }
[BsonElement("guest_data_root")]
public string? GuestStateDataRoot { get; set; }
[BsonElement("guest_data_root")]
public string? GuestStateDataRoot { get; set; }
[BsonElement("guest_state_file")]
public string? GuestStateFile { get; set; }
[BsonElement("guest_state_file")]
public string? GuestStateFile { get; set; }
[BsonElement("snapshot_data_root")]
public string? SnapshotDataRoot { get; set; }
[BsonElement("snapshot_data_root")]
public string? SnapshotDataRoot { get; set; }
[BsonElement("suspend_data_root")]
public string? SuspendDataRoot { get; set; }
[BsonElement("suspend_data_root")]
public string? SuspendDataRoot { get; set; }
[BsonElement("swap_data_root")]
public string? SwapFileDataRoot { get; set; }
}
[BsonElement("swap_data_root")]
public string? SwapFileDataRoot { get; set; }
}

View file

@ -2,217 +2,216 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostInterfaceEntity
{
[BsonIgnoreExtraElements]
public class HostInterfaceEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("mac")]
public string? Mac { get; set; }
[BsonElement("mac")]
public string? Mac { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("physical")]
public bool? Physical { get; set; }
[BsonElement("physical")]
public bool? Physical { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("suffix")]
public string? Suffix { get; set; }
[BsonElement("suffix")]
public string? Suffix { get; set; }
[BsonElement("speed")]
public long? Speed { get; set; }
[BsonElement("speed")]
public long? Speed { get; set; }
[BsonElement("ipv4_mtu")]
public long? Ipv4Mtu { get; set; }
[BsonElement("ipv4_mtu")]
public long? Ipv4Mtu { get; set; }
[BsonElement("ipv4_dhcp")]
public bool? Ipv4Dhcp { get; set; }
[BsonElement("ipv4_dhcp")]
public bool? Ipv4Dhcp { get; set; }
[BsonElement("ipv4_forwarding")]
public bool? Ipv4Forwarding { get; set; }
[BsonElement("ipv4_forwarding")]
public bool? Ipv4Forwarding { get; set; }
[BsonElement("ipv6_mtu")]
public long? Ipv6Mtu { get; set; }
[BsonElement("ipv6_mtu")]
public long? Ipv6Mtu { get; set; }
[BsonElement("sent")]
public long? Sent { get; set; }
[BsonElement("sent")]
public long? Sent { get; set; }
[BsonElement("received")]
public long? Received { get; set; }
[BsonElement("received")]
public long? Received { get; set; }
[BsonElement("packets_incoming_discarded")]
public long? IncomingPacketsDiscarded { get; set; }
[BsonElement("packets_incoming_discarded")]
public long? IncomingPacketsDiscarded { get; set; }
[BsonElement("packets_incoming_errors")]
public long? IncomingPacketsWithErrors { get; set; }
[BsonElement("packets_incoming_errors")]
public long? IncomingPacketsWithErrors { get; set; }
[BsonElement("packets_incoming_unknown")]
public long? IncomingUnknownProtocolPackets { get; set; }
[BsonElement("packets_incoming_unknown")]
public long? IncomingUnknownProtocolPackets { get; set; }
[BsonElement("packets_outgoing_discarded")]
public long? OutgoingPacketsDiscarded { get; set; }
[BsonElement("packets_outgoing_discarded")]
public long? OutgoingPacketsDiscarded { get; set; }
[BsonElement("packets_outgoing_errors")]
public long? OutgoingPacketsWithErrors { get; set; }
}
[BsonElement("packets_outgoing_errors")]
public long? OutgoingPacketsWithErrors { get; set; }
}
[BsonIgnoreExtraElements]
public class HostInterfaceAddressEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostInterfaceAddressEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("address")]
public string? Address { get; set; }
[BsonElement("address")]
public string? Address { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
//public string? State { get; set; }
//public long? PreferredLifetime { get; set; }
//public long? ValidLifetime { get; set; }
//public long? LeaseLifetime { get; set; }
//public int? PrefixLength { get; set; }
//public string? State { get; set; }
//public long? PreferredLifetime { get; set; }
//public long? ValidLifetime { get; set; }
//public long? LeaseLifetime { get; set; }
//public int? PrefixLength { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}
[BsonIgnoreExtraElements]
public class HostInterfaceGatewayEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostInterfaceGatewayEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("address")]
public string? Address { get; set; }
[BsonElement("address")]
public string? Address { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}
[BsonIgnoreExtraElements]
public class HostInterfaceNameserverEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostInterfaceNameserverEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("address")]
public string? Address { get; set; }
[BsonElement("address")]
public string? Address { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}
[BsonIgnoreExtraElements]
public class HostInterfaceRouteEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostInterfaceRouteEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_interface"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("interface")]
public string? Interface { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("destination")]
public string? Destination { get; set; }
[BsonElement("destination")]
public string? Destination { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
[BsonElement("mask")]
public string? Mask { get; set; }
[BsonElement("gateway")]
public string? Gateway { get; set; }
[BsonElement("gateway")]
public string? Gateway { get; set; }
[BsonElement("metric")]
public int? Metric { get; set; }
[BsonElement("metric")]
public int? Metric { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<HostInterfaceEntity>? Interfaces { get; set; }
}

View file

@ -2,36 +2,35 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostLogEntity
{
[BsonIgnoreExtraElements]
public class HostLogEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("eventid")]
public string? EventId { get; set; }
[BsonElement("eventid")]
public string? EventId { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("source")]
public string? Source { get; set; }
[BsonElement("source")]
public string? Source { get; set; }
[BsonElement("category")]
public string? Category { get; set; }
[BsonElement("category")]
public string? Category { get; set; }
[BsonElement("message")]
public string? Message { get; set; }
[BsonElement("message")]
public string? Message { get; set; }
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
}
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
}

View file

@ -2,42 +2,41 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostLogMonitoringEntity
{
[BsonIgnoreExtraElements]
public class HostLogMonitoringEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("hostname")]
public string? Hostname { get; set; }
[BsonElement("hostname")]
public string? Hostname { get; set; }
[BsonElement("category")]
public string? Category { get; set; }
[BsonElement("category")]
public string? Category { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("task")]
public string? Task { get; set; }
[BsonElement("task")]
public string? Task { get; set; }
[BsonElement("message")]
public string? Message { get; set; }
[BsonElement("message")]
public string? Message { get; set; }
[BsonElement("dispatch")]
public string? Dispatch { get; set; }
[BsonElement("dispatch")]
public string? Dispatch { get; set; }
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
}
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
}

View file

@ -2,39 +2,38 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostMainboardEntity
{
[BsonIgnoreExtraElements]
public class HostMainboardEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("bios")]
public string? Bios { get; set; }
[BsonElement("bios")]
public string? Bios { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("Date")]
public DateTime? Date { get; set; }
}
[BsonElement("Date")]
public DateTime? Date { get; set; }
}

View file

@ -2,57 +2,56 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostMemoryEntity
{
[BsonIgnoreExtraElements]
public class HostMemoryEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("tag")]
public string? Tag { get; set; }
[BsonElement("tag")]
public string? Tag { get; set; }
[BsonElement("location")]
public string? Location { get; set; }
[BsonElement("location")]
public string? Location { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("capacity")]
public ulong? Capacity { get; set; }
[BsonElement("capacity")]
public ulong? Capacity { get; set; }
[BsonElement("clock")]
public uint? Clock { get; set; }
[BsonElement("clock")]
public uint? Clock { get; set; }
[BsonElement("clock_current")]
public uint? CurrentClock { get; set; }
[BsonElement("clock_current")]
public uint? CurrentClock { get; set; }
[BsonElement("voltage")]
public uint? Voltage { get; set; }
[BsonElement("voltage")]
public uint? Voltage { get; set; }
[BsonElement("voltage_current")]
public uint? CurrentVoltage { get; set; }
}
[BsonElement("voltage_current")]
public uint? CurrentVoltage { get; set; }
}

View file

@ -2,39 +2,38 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostOsEntity
{
[BsonIgnoreExtraElements]
public class HostOsEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("architecture")]
public string? Architecture { get; set; }
[BsonElement("architecture")]
public string? Architecture { get; set; }
[BsonElement("serialnumber")]
public string? SerialNumber { get; set; }
[BsonElement("serialnumber")]
public string? SerialNumber { get; set; }
[BsonElement("virtual")]
public bool? Virtual { get; set; }
[BsonElement("virtual")]
public bool? Virtual { get; set; }
[BsonElement("installed")]
public DateTime? Installed { get; set; }
}
[BsonElement("installed")]
public DateTime? Installed { get; set; }
}

View file

@ -2,39 +2,38 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostPrinterEntity
{
[BsonIgnoreExtraElements]
public class HostPrinterEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("port")]
public string? Port { get; set; }
[BsonElement("port")]
public string? Port { get; set; }
[BsonElement("location")]
public string? Location { get; set; }
[BsonElement("location")]
public string? Location { get; set; }
[BsonElement("comment")]
public string? Comment { get; set; }
}
[BsonElement("comment")]
public string? Comment { get; set; }
}

View file

@ -2,69 +2,68 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostProcessorEntity
{
[BsonIgnoreExtraElements]
public class HostProcessorEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("socket")]
public string? Socket { get; set; }
[BsonElement("socket")]
public string? Socket { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("version")]
public string? Version { get; set; }
[BsonElement("cores")]
public uint? Cores { get; set; }
[BsonElement("cores")]
public uint? Cores { get; set; }
[BsonElement("logicalcores")]
public uint? LogicalCores { get; set; }
[BsonElement("logicalcores")]
public uint? LogicalCores { get; set; }
[BsonElement("clock")]
public uint? Clock { get; set; }
[BsonElement("clock")]
public uint? Clock { get; set; }
[BsonElement("clock_current")]
public uint? CurrentClock { get; set; }
[BsonElement("clock_current")]
public uint? CurrentClock { get; set; }
[BsonElement("l1")]
public uint? L1Size { get; set; }
[BsonElement("l1")]
public uint? L1Size { get; set; }
[BsonElement("l2")]
public uint? L2Size { get; set; }
[BsonElement("l2")]
public uint? L2Size { get; set; }
[BsonElement("l3")]
public uint? L3Size { get; set; }
[BsonElement("l3")]
public uint? L3Size { get; set; }
[BsonElement("virtualization")]
public bool? Virtualization { get; set; }
[BsonElement("virtualization")]
public bool? Virtualization { get; set; }
[BsonElement("pnp")]
public string? PNP { get; set; }
}
[BsonElement("pnp")]
public string? PNP { get; set; }
}

View file

@ -2,54 +2,53 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostServiceEntity
{
[BsonIgnoreExtraElements]
public class HostServiceEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("displayname")]
public string? DisplayName { get; set; }
[BsonElement("displayname")]
public string? DisplayName { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("startmode")]
public string? StartMode { get; set; }
[BsonElement("startmode")]
public string? StartMode { get; set; }
[BsonElement("state")]
public string? State { get; set; }
[BsonElement("state")]
public string? State { get; set; }
[BsonElement("processid")]
public uint? ProcessId { get; set; }
[BsonElement("processid")]
public uint? ProcessId { get; set; }
[BsonElement("delay")]
public bool? Delay { get; set; }
[BsonElement("delay")]
public bool? Delay { get; set; }
[BsonElement("path")]
public string? Path { get; set; }
[BsonElement("path")]
public string? Path { get; set; }
[BsonElement("account")]
public string? Account { get; set; }
}
[BsonElement("account")]
public string? Account { get; set; }
}

View file

@ -2,39 +2,38 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostSessionEntity
{
[BsonIgnoreExtraElements]
public class HostSessionEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("sid")]
public string? Sid { get; set; }
[BsonElement("sid")]
public string? Sid { get; set; }
[BsonElement("user")]
public string? User { get; set; }
[BsonElement("user")]
public string? User { get; set; }
[BsonElement("remote")]
public string? Remote { get; set; }
[BsonElement("remote")]
public string? Remote { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("state")]
public string? State { get; set; }
}
[BsonElement("state")]
public string? State { get; set; }
}

View file

@ -2,206 +2,205 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostStoragePoolEntity
{
[BsonIgnoreExtraElements]
public class HostStoragePoolEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("resiliency")]
public string? Resiliency { get; set; }
[BsonElement("resiliency")]
public string? Resiliency { get; set; }
[BsonElement("primordial")]
public bool? Primordial { get; set; }
[BsonElement("primordial")]
public bool? Primordial { get; set; }
[BsonElement("readonly")]
public bool? ReadOnly { get; set; }
[BsonElement("readonly")]
public bool? ReadOnly { get; set; }
[BsonElement("clustered")]
public bool? Clustered { get; set; }
[BsonElement("clustered")]
public bool? Clustered { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size_allocated")]
public ulong? AllocatedSize { get; set; }
[BsonElement("size_allocated")]
public ulong? AllocatedSize { get; set; }
[BsonElement("sectorsize")]
public ulong? SectorSize { get; set; }
[BsonElement("sectorsize")]
public ulong? SectorSize { get; set; }
[BsonElement("states")]
public List<string>? States { get; set; }
[BsonElement("states")]
public List<string>? States { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostStoragePoolPhysicalDiskEntity>? PhysicalDisks { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostStoragePoolPhysicalDiskEntity>? PhysicalDisks { get; set; }
[BsonIgnoreIfNull, JsonIgnore]
public List<HostStoragePoolVirtualDiskEntity>? VirtualDisks { get; set; }
}
[BsonIgnoreIfNull, JsonIgnore]
public List<HostStoragePoolVirtualDiskEntity>? VirtualDisks { get; set; }
}
[BsonIgnoreExtraElements]
public class HostStoragePoolVirtualDiskEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostStoragePoolVirtualDiskEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_storagepool"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("storagepool")]
public string? StoragePool { get; set; }
[BsonElement("_storagepool"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("storagepool")]
public string? StoragePool { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("access")]
public string? Access { get; set; }
[BsonElement("access")]
public string? Access { get; set; }
[BsonElement("provisioning")]
public string? Provisioning { get; set; }
[BsonElement("provisioning")]
public string? Provisioning { get; set; }
[BsonElement("redundancy")]
public uint? PhysicalRedundancy { get; set; }
[BsonElement("redundancy")]
public uint? PhysicalRedundancy { get; set; }
[BsonElement("resiliency")]
public string? Resiliency { get; set; }
[BsonElement("resiliency")]
public string? Resiliency { get; set; }
[BsonElement("deduplication")]
public bool? Deduplication { get; set; }
[BsonElement("deduplication")]
public bool? Deduplication { get; set; }
[BsonElement("snapshot")]
public bool? Snapshot { get; set; }
[BsonElement("snapshot")]
public bool? Snapshot { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size_allocated")]
public ulong? AllocatedSize { get; set; }
[BsonElement("size_allocated")]
public ulong? AllocatedSize { get; set; }
[BsonElement("footprint")]
public ulong? Footprint { get; set; }
[BsonElement("footprint")]
public ulong? Footprint { get; set; }
[BsonElement("cache_read_size")]
public ulong? ReadCacheSize { get; set; }
[BsonElement("cache_read_size")]
public ulong? ReadCacheSize { get; set; }
[BsonElement("cache_write_size")]
public ulong? WriteCacheSize { get; set; }
[BsonElement("cache_write_size")]
public ulong? WriteCacheSize { get; set; }
[BsonElement("states")]
public List<string>? States { get; set; }
}
[BsonElement("states")]
public List<string>? States { get; set; }
}
[BsonIgnoreExtraElements]
public class HostStoragePoolPhysicalDiskEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostStoragePoolPhysicalDiskEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_storagepool"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("storagepool")]
public string? StoragePool { get; set; }
[BsonElement("_storagepool"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("storagepool")]
public string? StoragePool { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("uniqueid")]
public string? UniqueId { get; set; }
[BsonElement("deviceid")]
public string? DeviceId { get; set; }
[BsonElement("deviceid")]
public string? DeviceId { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("manufacturer")]
public string? Manufacturer { get; set; }
[BsonElement("manufacturer")]
public string? Manufacturer { get; set; }
[BsonElement("Model")]
public string? Model { get; set; }
[BsonElement("Model")]
public string? Model { get; set; }
[BsonElement("media")]
public string? Media { get; set; }
[BsonElement("media")]
public string? Media { get; set; }
[BsonElement("bus")]
public string? Bus { get; set; }
[BsonElement("bus")]
public string? Bus { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("health")]
public string? Health { get; set; }
[BsonElement("usage")]
public ushort? Usage { get; set; }
[BsonElement("usage")]
public ushort? Usage { get; set; }
[BsonElement("location")]
public string? Location { get; set; }
[BsonElement("location")]
public string? Location { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("firmware")]
public string? Firmware { get; set; }
[BsonElement("firmware")]
public string? Firmware { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size_allocated")]
public ulong? AllocatedSize { get; set; }
[BsonElement("size_allocated")]
public ulong? AllocatedSize { get; set; }
[BsonElement("footprint")]
public ulong? Footprint { get; set; }
[BsonElement("footprint")]
public ulong? Footprint { get; set; }
[BsonElement("sector_size_physical")]
public ulong? PhysicalSectorSize { get; set; }
[BsonElement("sector_size_physical")]
public ulong? PhysicalSectorSize { get; set; }
[BsonElement("sector_size_logical")]
public ulong? LogicalSectorSize { get; set; }
[BsonElement("sector_size_logical")]
public ulong? LogicalSectorSize { get; set; }
[BsonElement("states")]
public List<string>? States { get; set; }
}
[BsonElement("states")]
public List<string>? States { get; set; }
}

View file

@ -2,33 +2,32 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostSystemEntity
{
[BsonIgnoreExtraElements]
public class HostSystemEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("localtime")]
public DateTime? LocalTime { get; set; }
[BsonElement("localtime")]
public DateTime? LocalTime { get; set; }
[BsonElement("bootuptime")]
public DateTime? BootUpTime { get; set; }
[BsonElement("bootuptime")]
public DateTime? BootUpTime { get; set; }
[BsonElement("processes")]
public uint? Processes { get; set; }
[BsonElement("processes")]
public uint? Processes { get; set; }
[BsonElement("license")]
public string? License { get; set; }
}
[BsonElement("license")]
public string? License { get; set; }
}

View file

@ -2,60 +2,59 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostUpdateEntity
{
[BsonIgnoreExtraElements]
public class HostUpdateEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; } // os update id
[BsonElement("serial")]
public string? Serial { get; set; } // os update id
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("supporturl")]
public string? SupportUrl { get; set; }
[BsonElement("supporturl")]
public string? SupportUrl { get; set; }
[BsonElement("date")]
public DateTime? Date { get; set; }
[BsonElement("date")]
public DateTime? Date { get; set; }
[BsonElement("pending")]
public bool? Pending { get; set; }
[BsonElement("pending")]
public bool? Pending { get; set; }
[BsonElement("result"), BsonIgnoreIfNull] // installed only
public string? Result { get; set; }
[BsonElement("result"), BsonIgnoreIfNull] // installed only
public string? Result { get; set; }
[BsonElement("type"), BsonIgnoreIfNull] // pending only
public string? Type { get; set; }
[BsonElement("type"), BsonIgnoreIfNull] // pending only
public string? Type { get; set; }
[BsonElement("size"), BsonIgnoreIfNull] // pending only
public decimal? Size { get; set; }
[BsonElement("size"), BsonIgnoreIfNull] // pending only
public decimal? Size { get; set; }
[BsonElement("downloaded"), BsonIgnoreIfNull] // pending only
public bool? IsDownloaded { get; set; }
[BsonElement("downloaded"), BsonIgnoreIfNull] // pending only
public bool? IsDownloaded { get; set; }
[BsonElement("inputrequest"), BsonIgnoreIfNull] // pending only
public bool? CanRequestUserInput { get; set; }
[BsonElement("inputrequest"), BsonIgnoreIfNull] // pending only
public bool? CanRequestUserInput { get; set; }
[BsonElement("reboot"), BsonIgnoreIfNull] // pending only
public string? RebootBehavior { get; set; }
}
[BsonElement("reboot"), BsonIgnoreIfNull] // pending only
public string? RebootBehavior { get; set; }
}

View file

@ -2,119 +2,118 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostUserEntity
{
[BsonIgnoreExtraElements]
public class HostUserEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("sid")]
public string? Sid { get; set; }
[BsonElement("sid")]
public string? Sid { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("domain")]
public string? Domain { get; set; }
[BsonElement("domain")]
public string? Domain { get; set; }
[BsonElement("fullname")]
public string? FullName { get; set; }
[BsonElement("fullname")]
public string? FullName { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("status")]
public string? Status { get; set; }
[BsonElement("localaccount")]
public bool? LocalAccount { get; set; }
[BsonElement("localaccount")]
public bool? LocalAccount { get; set; }
[BsonElement("disabled")]
public bool? Disabled { get; set; }
[BsonElement("disabled")]
public bool? Disabled { get; set; }
[BsonElement("lockout")]
public bool? Lockout { get; set; }
[BsonElement("lockout")]
public bool? Lockout { get; set; }
[BsonElement("password_changeable")]
public bool? PasswordChangeable { get; set; }
[BsonElement("password_changeable")]
public bool? PasswordChangeable { get; set; }
[BsonElement("password_expires")]
public bool? PasswordExpires { get; set; }
[BsonElement("password_expires")]
public bool? PasswordExpires { get; set; }
[BsonElement("password_required")]
public bool? PasswordRequired { get; set; }
}
[BsonElement("password_required")]
public bool? PasswordRequired { get; set; }
}
[BsonIgnoreExtraElements]
public class HostGroupEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostGroupEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("sid")]
public string? Sid { get; set; }
[BsonElement("sid")]
public string? Sid { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("domain")]
public string? Domain { get; set; }
[BsonElement("domain")]
public string? Domain { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("description")]
public string? Description { get; set; }
[BsonElement("localaccount")]
public bool? LocalAccount { get; set; }
}
[BsonElement("localaccount")]
public bool? LocalAccount { get; set; }
}
[BsonIgnoreExtraElements]
public class HostUserGroupEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class HostUserGroupEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_user"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("user")]
public string? User { get; set; }
[BsonElement("_user"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("user")]
public string? User { get; set; }
[BsonElement("_group"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("group")]
public string? Group { get; set; }
[BsonElement("_group"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("group")]
public string? Group { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
}
[BsonElement("update")]
public DateTime? Update { get; set; }
}

View file

@ -2,39 +2,38 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostVideocardEntity
{
[BsonIgnoreExtraElements]
public class HostVideocardEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("company")]
public string? Company { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("memory")]
public ulong? Memory { get; set; }
[BsonElement("memory")]
public ulong? Memory { get; set; }
[BsonElement("driver")]
public string? Driver { get; set; }
[BsonElement("driver")]
public string? Driver { get; set; }
[BsonElement("date")]
public DateTime? Date { get; set; }
}
[BsonElement("date")]
public DateTime? Date { get; set; }
}

View file

@ -2,75 +2,74 @@
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[BsonIgnoreExtraElements]
public class HostVolumeEntity
{
[BsonIgnoreExtraElements]
public class HostVolumeEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_host"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("host")]
public string? Host { get; set; }
[BsonElement("_drive"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("drive")]
public string? Drive { get; set; }
[BsonElement("_drive"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("drive")]
public string? Drive { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("_batch"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("batch")]
public string? Batch { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("index")]
public uint? Index { get; set; }
[BsonElement("label")]
public string? Label { get; set; }
[BsonElement("label")]
public string? Label { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("name")]
public string? Name { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("serial")]
public string? Serial { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("size")]
public ulong? Size { get; set; }
[BsonElement("freespace")]
public ulong? FreeSpace { get; set; }
[BsonElement("freespace")]
public ulong? FreeSpace { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("type")]
public string? Type { get; set; }
[BsonElement("filesystem")]
public string? FileSystem { get; set; }
[BsonElement("filesystem")]
public string? FileSystem { get; set; }
[BsonElement("compressed")]
public bool? Compressed { get; set; }
[BsonElement("compressed")]
public bool? Compressed { get; set; }
[BsonElement("bootable")]
public bool? Bootable { get; set; }
[BsonElement("bootable")]
public bool? Bootable { get; set; }
[BsonElement("primary")]
public bool? Primary { get; set; }
[BsonElement("primary")]
public bool? Primary { get; set; }
[BsonElement("boot")]
public bool? Boot { get; set; }
[BsonElement("boot")]
public bool? Boot { get; set; }
[BsonElement("blocksize")]
public ulong? BlockSize { get; set; }
[BsonElement("blocksize")]
public ulong? BlockSize { get; set; }
[BsonElement("blocks")]
public ulong? Blocks { get; set; }
[BsonElement("blocks")]
public ulong? Blocks { get; set; }
[BsonElement("startoffset")]
public ulong? StartingOffset { get; set; }
[BsonElement("startoffset")]
public ulong? StartingOffset { get; set; }
[BsonElement("provider")]
public string? Provider { get; set; }
}
[BsonElement("provider")]
public string? Provider { get; set; }
}

View file

@ -4,96 +4,92 @@ using MongoDB.Bson.Serialization.Attributes;
using MongoDbGenericRepository.Attributes;
using System.Text.Json.Serialization;
namespace Insight.Infrastructure.Entities
namespace Insight.Infrastructure.Entities;
[CollectionName("user"), BsonIgnoreExtraElements]
public class InsightUser : MongoIdentityUser<ObjectId>
{
[CollectionName("user"), BsonIgnoreExtraElements]
public class InsightUser : MongoIdentityUser<ObjectId>
{
public InsightUser() : base() { }
public InsightUser() : base() { }
public InsightUser(string userName, string email) : base(userName, email) { }
public InsightUser(string userName, string email) : base(userName, email) { }
[JsonPropertyName("refresh_tokens")]
public List<RefreshToken>? RefreshTokens { get; set; }
}
[JsonPropertyName("refresh_tokens")]
public List<RefreshToken>? RefreshTokens { get; set; }
}
[BsonIgnoreExtraElements]
public class InsightUserLogEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonIgnoreExtraElements]
public class InsightUserLogEntity
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_user"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("user")]
public string? User { get; set; }
[BsonElement("_user"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("user")]
public string? User { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
[BsonElement("timestamp")]
public DateTime? Timestamp { get; set; }
[BsonElement("message")]
public string? Message { get; set; }
}
[BsonElement("message")]
public string? Message { get; set; }
}
[CollectionName("user_pref"), BsonIgnoreExtraElements]
public class InsightUserPreferences
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[CollectionName("user_pref"), BsonIgnoreExtraElements]
public class InsightUserPreferences
{
[BsonId, BsonRepresentation(BsonType.ObjectId), JsonPropertyName("id")]
public string? Id { get; set; }
[BsonElement("_user"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("user")]
public string? User { get; set; }
[BsonElement("_user"), BsonRepresentation(BsonType.ObjectId), JsonPropertyName("user")]
public string? User { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("insert")]
public DateTime? Insert { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("update")]
public DateTime? Update { get; set; }
[BsonElement("darkmode")]
public bool DarkMode { get; set; }
}
[BsonElement("darkmode")]
public bool DarkMode { get; set; }
}
[CollectionName("role")]
public class InsightRole : MongoIdentityRole<ObjectId>
{
[CollectionName("role")]
public class InsightRole : MongoIdentityRole<ObjectId>
{
public InsightRole() : base() { }
}
public InsightRole(string roleName) : base(roleName) { }
}
[BsonIgnoreExtraElements]
public class RefreshToken
{
[BsonElement("token")]
public string? Token { get; set; }
[BsonIgnoreExtraElements]
public class RefreshToken
{
[BsonElement("token")]
public string? Token { get; set; }
[BsonElement("created")]
public DateTime Created { get; set; }
[BsonElement("created")]
public DateTime Created { get; set; }
[BsonElement("created_ip")]
public string? CreatedByIp { get; set; }
[BsonElement("created_ip")]
public string? CreatedByIp { get; set; }
[BsonElement("expires")]
public DateTime Expires { get; set; }
[BsonElement("expires")]
public DateTime Expires { get; set; }
[BsonElement("revoked")]
public DateTime? Revoked { get; set; }
[BsonElement("revoked")]
public DateTime? Revoked { get; set; }
[BsonElement("revoked_ip")]
public string? RevokedByIp { get; set; }
[BsonElement("revoked_ip")]
public string? RevokedByIp { get; set; }
[BsonElement("revoked_reason")]
public string? ReasonRevoked { get; set; }
[BsonElement("revoked_reason")]
public string? ReasonRevoked { get; set; }
[BsonIgnore, JsonIgnore]
public bool IsExpired => DateTime.Now >= Expires.ToLocalTime();
[BsonIgnore, JsonIgnore]
public bool IsExpired => DateTime.Now >= Expires.ToLocalTime();
[BsonIgnore, JsonIgnore]
public bool IsRevoked => Revoked != null;
[BsonIgnore, JsonIgnore]
public bool IsRevoked => Revoked != null;
[BsonIgnore, JsonIgnore]
public bool IsActive => !IsRevoked && !IsExpired;
}
[BsonIgnore, JsonIgnore]
public bool IsActive => !IsRevoked && !IsExpired;
}