//
using System;
using Heimdall.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Heimdall.Infrastructure.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Heimdall.Domain.Entities.Agent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ApiKeyHash")
.HasMaxLength(128)
.IsUnicode(false)
.HasColumnType("character varying(128)");
b.Property("ApiKeyPrefix")
.HasMaxLength(8)
.IsUnicode(false)
.HasColumnType("character varying(8)");
b.Property("Arch")
.HasColumnType("text");
b.Property("ContainerCpuLimit")
.HasColumnType("bigint");
b.Property("ContainerId")
.HasColumnType("text");
b.Property("ContainerImage")
.HasColumnType("text");
b.Property("ContainerMemoryLimitBytes")
.HasColumnType("bigint");
b.Property("CpuArchitecture")
.HasColumnType("text");
b.Property("CpuCacheBytes")
.HasColumnType("bigint");
b.Property("CpuCores")
.HasColumnType("integer");
b.Property("CpuFlags")
.HasColumnType("text");
b.Property("CpuFrequencyMhz")
.HasColumnType("double precision");
b.Property("CpuModel")
.HasColumnType("text");
b.Property("CpuUsagePercent")
.HasColumnType("double precision");
b.Property("CpuVendor")
.HasColumnType("text");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone");
b.Property("DiskInventoryJson")
.HasColumnType("text");
b.Property("DiskUsagePercent")
.HasColumnType("double precision");
b.Property("GpuInventoryJson")
.HasColumnType("text");
b.Property("GpuLoadPercent")
.HasColumnType("double precision");
b.Property("GpuName")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("GpuType")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("HasGpu")
.HasColumnType("boolean");
b.Property("Hostname")
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false)
.HasColumnType("character varying(255)");
b.Property("IsDeleted")
.HasColumnType("boolean");
b.Property("KernelVersion")
.HasColumnType("text");
b.Property("LastAppliedCameraConfigAt")
.HasColumnType("timestamp with time zone");
b.Property("LastAppliedCameraConfigVersion")
.HasMaxLength(64)
.IsUnicode(false)
.HasColumnType("character varying(64)");
b.Property("LastHeartbeat")
.HasColumnType("timestamp with time zone");
b.Property("LogicalCores")
.HasColumnType("integer");
b.Property("MemAvailableBytes")
.HasColumnType("bigint");
b.Property("MemTotalBytes")
.HasColumnType("bigint");
b.Property("MemoryMb")
.HasColumnType("bigint");
b.Property("MemoryUsageBytes")
.HasColumnType("bigint");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("NetworkInterfacesJson")
.HasColumnType("text");
b.Property("OsName")
.HasColumnType("text");
b.Property("PhysicalCores")
.HasColumnType("integer");
b.Property("PublicIp")
.HasMaxLength(45)
.IsUnicode(false)
.HasColumnType("character varying(45)");
b.Property("SiteId")
.HasColumnType("uuid");
b.Property("Status")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("SwapFreeBytes")
.HasColumnType("bigint");
b.Property("SwapTotalBytes")
.HasColumnType("bigint");
b.Property("TemperatureJson")
.HasColumnType("text");
b.Property("ThreadsPerCore")
.HasColumnType("integer");
b.Property("UpdatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("UptimeMachineSeconds")
.HasColumnType("bigint");
b.Property("UptimeSeconds")
.HasColumnType("bigint");
b.Property("Version")
.IsRequired()
.HasMaxLength(50)
.IsUnicode(false)
.HasColumnType("character varying(50)");
b.Property("VramMb")
.HasColumnType("bigint");
b.Property("VramUsageBytes")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("LastHeartbeat")
.HasFilter("\"Status\" = 'Online'");
b.HasIndex("SiteId");
b.ToTable("agents", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.AgentLogEntry", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AgentId")
.HasColumnType("uuid");
b.Property("Exception")
.HasMaxLength(4000)
.HasColumnType("character varying(4000)");
b.Property("Level")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("Message")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("Source")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("TimestampUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("AgentId", "TimestampUtc");
b.ToTable("agent_log_entries", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.AgentSetting", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AgentId")
.HasColumnType("uuid")
.HasColumnName("agent_id");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("Key")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)")
.HasColumnName("key");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Value")
.IsRequired()
.HasColumnType("text")
.HasColumnName("value");
b.HasKey("Id");
b.HasIndex("AgentId", "Key")
.IsUnique();
b.ToTable("agent_settings", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.AnalysisJob", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AssignedAgentId")
.HasColumnType("uuid");
b.Property("AttemptId")
.HasColumnType("uuid");
b.Property("CameraId")
.HasColumnType("uuid");
b.Property("CompletedAt")
.HasColumnType("timestamp with time zone");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("DispatchedAt")
.HasColumnType("timestamp with time zone");
b.Property("ErrorMessage")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("JobType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("MaxExecutionTime")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasDefaultValue(3000000000L);
b.Property("MaxRetries")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(3);
b.Property("ParametersJson")
.HasColumnType("jsonb");
b.Property("Priority")
.HasColumnType("integer");
b.Property("RequiredCpuCores")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0);
b.Property("RequiredMemoryMb")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasDefaultValue(0L);
b.Property("RequiresGpu")
.HasColumnType("boolean");
b.Property("ResultJson")
.HasColumnType("jsonb");
b.Property("RetryCount")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(0);
b.Property("SiteId")
.HasColumnType("uuid");
b.Property("StartedAt")
.HasColumnType("timestamp with time zone");
b.Property("Status")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("CameraId")
.HasDatabaseName("ix_analysis_jobs_camera");
b.HasIndex("AssignedAgentId", "Status")
.HasDatabaseName("ix_analysis_jobs_agent_workload")
.HasFilter("\"AssignedAgentId\" IS NOT NULL");
b.HasIndex("Status", "DispatchedAt")
.HasDatabaseName("ix_analysis_jobs_timeout");
b.HasIndex("Status", "Priority", "CreatedAt")
.HasDatabaseName("ix_analysis_jobs_pending");
b.ToTable("analysis_jobs", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.ApiKey", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("CreatedByUserId")
.HasColumnType("uuid");
b.Property("Enabled")
.HasColumnType("boolean");
b.Property("ExpiresAt")
.HasColumnType("timestamp with time zone");
b.Property("KeyHash")
.IsRequired()
.HasMaxLength(128)
.IsUnicode(false)
.HasColumnType("character varying(128)");
b.Property("KeyPrefix")
.IsRequired()
.HasMaxLength(8)
.IsUnicode(false)
.HasColumnType("character varying(8)");
b.Property("LastUsedAt")
.HasColumnType("timestamp with time zone");
b.Property("SiteId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("KeyHash");
b.HasIndex("KeyPrefix");
b.HasIndex("SiteId");
b.ToTable("api_keys", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.AppRole", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
b.Property("Name")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("NormalizedName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex");
b.ToTable("roles", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.AppSetting", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AgentScoped")
.HasColumnType("boolean");
b.Property("AllowedValues")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)")
.HasColumnName("allowed_values");
b.Property("Category")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("category");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property("Description")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasColumnName("description");
b.Property("Key")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)")
.HasColumnName("key");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.Property("Value")
.IsRequired()
.HasColumnType("text")
.HasColumnName("value");
b.Property("ValueType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("value_type");
b.HasKey("Id");
b.HasIndex("Key")
.IsUnique();
b.ToTable("app_settings", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.AppUser", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AccessFailedCount")
.HasColumnType("integer");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("DisplayName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property("Email")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("EmailConfirmed")
.HasColumnType("boolean");
b.Property("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(10)
.IsUnicode(false)
.HasColumnType("character varying(10)")
.HasDefaultValue("fr");
b.Property("LockoutEnabled")
.HasColumnType("boolean");
b.Property("LockoutEnd")
.HasColumnType("timestamp with time zone");
b.Property("MustChangePassword")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false);
b.Property("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("PasswordHash")
.HasColumnType("text");
b.Property("PhoneNumber")
.HasColumnType("text");
b.Property("PhoneNumberConfirmed")
.HasColumnType("boolean");
b.Property("SecurityStamp")
.HasColumnType("text");
b.Property("Theme")
.ValueGeneratedOnAdd()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)")
.HasDefaultValue("Auto");
b.Property("TwoFactorEnabled")
.HasColumnType("boolean");
b.Property("UserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("users", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.AuditLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Action")
.IsRequired()
.HasMaxLength(100)
.IsUnicode(false)
.HasColumnType("character varying(100)");
b.Property("IpAddress")
.HasMaxLength(45)
.IsUnicode(false)
.HasColumnType("character varying(45)");
b.Property("NewValue")
.HasColumnType("text");
b.Property("OldValue")
.HasColumnType("text");
b.Property("ResourceId")
.HasMaxLength(100)
.IsUnicode(false)
.HasColumnType("character varying(100)");
b.Property("ResourceType")
.IsRequired()
.HasMaxLength(100)
.IsUnicode(false)
.HasColumnType("character varying(100)");
b.Property("Timestamp")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("Timestamp")
.IsDescending();
b.HasIndex("UserId");
b.HasIndex("ResourceType", "ResourceId", "Timestamp")
.IsDescending(false, false, true);
b.ToTable("audit_logs", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.Camera", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AgentId")
.HasColumnType("uuid");
b.Property("Capabilities")
.IsRequired()
.HasMaxLength(64)
.IsUnicode(false)
.HasColumnType("character varying(64)");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("DeletedAt")
.HasColumnType("timestamp with time zone");
b.Property("DetectedType")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("DiscoveryMethod")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("HasAudio")
.HasColumnType("boolean");
b.Property("HasMotionDetection")
.HasColumnType("boolean");
b.Property("HasPtz")
.HasColumnType("boolean");
b.Property("HttpPort")
.HasColumnType("integer");
b.Property("IpAddress")
.HasMaxLength(45)
.HasColumnType("character varying(45)");
b.Property("IsDeleted")
.HasColumnType("boolean");
b.Property("LastDiscoveredAt")
.HasColumnType("timestamp with time zone");
b.Property("LastStreamTestAt")
.HasColumnType("timestamp with time zone");
b.Property("LastTestedCodecs")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("LastTestedHeight")
.HasColumnType("integer");
b.Property("LastTestedLatencyMs")
.HasColumnType("bigint");
b.Property("LastTestedWidth")
.HasColumnType("integer");
b.Property("MacAddress")
.HasMaxLength(17)
.HasColumnType("character varying(17)");
b.Property("Manufacturer")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Model")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("OnvifPort")
.HasColumnType("integer");
b.Property("RtspPort")
.HasColumnType("integer");
b.Property("RtspUrl")
.HasMaxLength(1000)
.IsUnicode(false)
.HasColumnType("character varying(1000)");
b.Property("SiteId")
.HasColumnType("uuid");
b.Property("Status")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("StoragePolicyId")
.HasColumnType("uuid");
b.Property("SubRtspUrl")
.HasMaxLength(1000)
.IsUnicode(false)
.HasColumnType("character varying(1000)");
b.Property("UpdatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.HasKey("Id");
b.HasIndex("AgentId");
b.HasIndex("IpAddress");
b.HasIndex("MacAddress");
b.HasIndex("SiteId");
b.HasIndex("StoragePolicyId");
b.ToTable("cameras", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.CameraAssignment", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AgentId")
.HasColumnType("uuid");
b.Property("AssignedAt")
.HasColumnType("timestamp with time zone");
b.Property("CameraId")
.HasColumnType("uuid");
b.Property("Reason")
.IsRequired()
.HasMaxLength(50)
.IsUnicode(false)
.HasColumnType("character varying(50)");
b.Property("ReleasedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("AssignedAt");
b.HasIndex("AgentId", "ReleasedAt")
.HasFilter("\"ReleasedAt\" IS NULL");
b.HasIndex("CameraId", "ReleasedAt")
.IsUnique()
.HasFilter("\"ReleasedAt\" IS NULL");
b.ToTable("camera_assignments", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.CameraCredentials", b =>
{
b.Property("CameraId")
.HasColumnType("uuid");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("OnvifPassword")
.IsRequired()
.HasMaxLength(500)
.IsUnicode(false)
.HasColumnType("character varying(500)");
b.Property("OnvifUsername")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(100)
.IsUnicode(false)
.HasColumnType("character varying(100)")
.HasDefaultValue("admin");
b.Property("RtspPassword")
.IsRequired()
.HasMaxLength(500)
.IsUnicode(false)
.HasColumnType("character varying(500)");
b.Property("RtspUsername")
.IsRequired()
.HasMaxLength(100)
.IsUnicode(false)
.HasColumnType("character varying(100)");
b.Property("UpdatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.HasKey("CameraId");
b.ToTable("camera_credentials", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.CameraDetectionProfile", b =>
{
b.Property("ExecutionProfileJson")
.HasColumnType("text");
b.Property("CameraId")
.HasColumnType("uuid");
b.Property("ActiveIntervalMs")
.HasColumnType("integer");
b.Property("AnimalCooldownSec")
.HasColumnType("integer");
b.Property("DetectAnimal")
.HasColumnType("boolean");
b.Property("DetectMotion")
.HasColumnType("boolean");
b.Property("DetectPackage")
.HasColumnType("boolean");
b.Property("DetectPerson")
.HasColumnType("boolean");
b.Property("DetectVehicle")
.HasColumnType("boolean");
b.Property("FaceRecognition")
.HasColumnType("boolean");
b.Property("IdleIntervalMs")
.HasColumnType("integer");
b.Property("IoUThreshold")
.HasColumnType("double precision");
b.Property("LicensePlateRecognition")
.HasColumnType("boolean");
b.Property("MaxEventsPerMinute")
.HasColumnType("integer");
b.Property("MinConfidence")
.ValueGeneratedOnAdd()
.HasColumnType("double precision")
.HasDefaultValue(0.40000000000000002);
b.Property("MotionIntervalMs")
.HasColumnType("integer");
b.Property("MotionThreshold")
.HasColumnType("double precision");
b.Property("PersonCooldownSec")
.HasColumnType("integer");
b.Property("RequireMotionForAI")
.HasColumnType("boolean");
b.Property("VehicleCooldownSec")
.HasColumnType("integer");
b.Property("YoloModel")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(50)
.IsUnicode(false)
.HasColumnType("character varying(50)")
.HasDefaultValue("yolov8n");
b.HasKey("CameraId");
b.ToTable("camera_detection_profiles", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.CameraDiscoveryResult", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("DetectedType")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("DiscoveryMethod")
.IsRequired()
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("HomeKitDeviceId")
.HasMaxLength(50)
.IsUnicode(false)
.HasColumnType("character varying(50)");
b.Property("HomeKitCategory")
.HasColumnType("integer");
b.Property("HomeKitIsPaired")
.HasColumnType("boolean");
b.Property("HomeKitPort")
.HasColumnType("integer");
b.Property("HomeKitModel")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("HomeKitName")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("Hostname")
.HasMaxLength(255)
.IsUnicode(false)
.HasColumnType("character varying(255)");
b.Property("HttpPort")
.HasColumnType("integer");
b.Property("HttpServerHeader")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("HttpStatusCode")
.HasColumnType("integer");
b.Property("IpAddress")
.IsRequired()
.HasMaxLength(45)
.IsUnicode(false)
.HasColumnType("character varying(45)");
b.Property("IsHomeKitCamera")
.HasColumnType("boolean");
b.Property("IsProcessed")
.HasColumnType("boolean");
b.Property("IsReachable")
.HasColumnType("boolean");
b.Property("MacAddress")
.HasMaxLength(17)
.IsUnicode(false)
.HasColumnType("character varying(17)");
b.Property("OnvifDeviceServiceUrl")
.HasMaxLength(500)
.IsUnicode(false)
.HasColumnType("character varying(500)");
b.Property("OnvifHardware")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("OnvifName")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("OnvifPort")
.HasColumnType("integer");
b.PrimitiveCollection("OpenPorts")
.IsRequired()
.IsUnicode(false)
.HasColumnType("integer[]");
b.Property("ProbedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("SiteId")
.HasColumnType("uuid");
b.Property("Vendor")
.HasMaxLength(100)
.IsUnicode(false)
.HasColumnType("character varying(100)");
b.HasKey("Id");
b.HasIndex("IpAddress");
b.HasIndex("IsProcessed");
b.HasIndex("SiteId");
b.ToTable("camera_discovery_results", (string)null);
});
modelBuilder.Entity("Heimdall.Domain.Entities.CameraEvent", b =>
{
b.Property("Id")
.HasColumnType("uuid");
b.Property("OccurredAt")
.HasColumnType("timestamp with time zone");
b.Property("AgentId")
.HasColumnType("uuid");
b.Property("CameraId")
.HasColumnType("uuid");
b.Property("Confidence")
.ValueGeneratedOnAdd()
.HasColumnType("double precision")
.HasDefaultValue(0.0);
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("NOW()");
b.Property("DetectionHash")
.HasMaxLength(128)
.IsUnicode(false)
.HasColumnType("character varying(128)");
b.Property("IsSuppressed")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false);
b.Property("Label")
.HasMaxLength(200)
.IsUnicode(false)
.HasColumnType("character varying(200)");
b.Property("MetadataJson")
.HasColumnType("jsonb");
b.Property("ParentEventId")
.HasColumnType("uuid");
b.Property("PersonId")
.HasColumnType("uuid");
b.Property("RecordingId")
.HasColumnType("uuid");
b.Property("SnapshotThumbUrl")
.HasMaxLength(2000)
.IsUnicode(false)
.HasColumnType("character varying(2000)");
b.Property("SnapshotObjectKey")
.HasMaxLength(2000)
.IsUnicode(false)
.HasColumnType("character varying(2000)");
b.Property("SnapshotThumbObjectKey")
.HasMaxLength(2000)
.IsUnicode(false)
.HasColumnType("character varying(2000)");
b.Property("SnapshotStorageProvider")
.HasMaxLength(20)
.IsUnicode(false)
.HasColumnType("character varying(20)");
b.Property("SnapshotStorageRoot")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("SnapshotStorageEndpoint")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("SnapshotStorageBucket")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("SnapshotUrl")
.HasMaxLength(2000)
.IsUnicode(false)
.HasColumnType("character varying(2000)");
b.Property("TrackId")
.HasMaxLength(100)
.IsUnicode(false)
.HasColumnType("character varying(100)");
b.Property("Type")
.HasColumnType("integer");
b.Property