feat(mvp): complete MVP hardening — API, Web, config system, SignalR, tests
This commit is contained in:
1 parent
3fc42be4b2
commit
c2837af089
59 files changed
+4920
-81
No files matched your search
@@ -30,10 +30,12 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
|
||||
b.Property<string>("ApiKeyHash")
|
||||
.HasMaxLength(128)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(128)");
|
||||
|
||||
b.Property<string>("ApiKeyPrefix")
|
||||
.HasMaxLength(8)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(8)");
|
||||
|
||||
b.Property<int>("CpuCores")
|
||||
@@ -50,6 +52,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("GpuType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(20)");
|
||||
|
||||
b.Property<bool>("HasGpu")
|
||||
@@ -58,6 +61,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Hostname")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
@@ -72,10 +76,12 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(200)");
|
||||
|
||||
b.Property<string>("PublicIp")
|
||||
.HasMaxLength(45)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(45)");
|
||||
|
||||
b.Property<Guid>("SiteId")
|
||||
@@ -84,6 +90,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(20)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
@@ -94,6 +101,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Version")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasKey("Id");
|
||||
@@ -106,6 +114,43 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.ToTable("agents", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Heimdall.Domain.Entities.AgentSetting", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("AgentId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("agent_id");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_at");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("character varying(200)")
|
||||
.HasColumnName("key");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("updated_at");
|
||||
|
||||
b.Property<string>("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.ApiKey", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -129,11 +174,13 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("KeyHash")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(128)");
|
||||
|
||||
b.Property<string>("KeyPrefix")
|
||||
.IsRequired()
|
||||
.HasMaxLength(8)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(8)");
|
||||
|
||||
b.Property<DateTime?>("LastUsedAt")
|
||||
@@ -180,6 +227,61 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.ToTable("roles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Heimdall.Domain.Entities.AppSetting", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("AllowedValues")
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("character varying(2000)")
|
||||
.HasColumnName("allowed_values");
|
||||
|
||||
b.Property<string>("Category")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("character varying(100)")
|
||||
.HasColumnName("category");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_at");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("character varying(500)")
|
||||
.HasColumnName("description");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("character varying(200)")
|
||||
.HasColumnName("key");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("updated_at");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("value");
|
||||
|
||||
b.Property<string>("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<Guid>("Id")
|
||||
@@ -214,6 +316,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(10)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasDefaultValue("fr");
|
||||
|
||||
@@ -251,6 +354,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Theme")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(20)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(20)")
|
||||
.HasDefaultValue("Auto");
|
||||
|
||||
@@ -282,10 +386,12 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Action")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<string>("IpAddress")
|
||||
.HasMaxLength(45)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(45)");
|
||||
|
||||
b.Property<string>("NewValue")
|
||||
@@ -296,11 +402,13 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
|
||||
b.Property<string>("ResourceId")
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<string>("ResourceType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<DateTime>("Timestamp")
|
||||
@@ -364,10 +472,12 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(200)");
|
||||
|
||||
b.Property<string>("RtspUrl")
|
||||
.HasMaxLength(1000)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(1000)");
|
||||
|
||||
b.Property<Guid>("SiteId")
|
||||
@@ -376,6 +486,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(20)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
@@ -405,23 +516,27 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Property<string>("OnvifPassword")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(500)");
|
||||
|
||||
b.Property<string>("OnvifUsername")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(100)")
|
||||
.HasDefaultValue("admin");
|
||||
|
||||
b.Property<string>("RtspPassword")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(500)");
|
||||
|
||||
b.Property<string>("RtspUsername")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
@@ -499,6 +614,7 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(50)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(50)")
|
||||
.HasDefaultValue("yolov8n");
|
||||
|
||||
@@ -538,12 +654,14 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
|
||||
b.Property<string>("RegistrationTokenHash")
|
||||
.HasMaxLength(128)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(128)");
|
||||
|
||||
b.Property<string>("Timezone")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("character varying(100)")
|
||||
.HasDefaultValue("UTC");
|
||||
|
||||
@@ -694,6 +812,17 @@ namespace Heimdall.Infrastructure.Migrations
|
||||
b.Navigation("Site");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Heimdall.Domain.Entities.AgentSetting", b =>
|
||||
{
|
||||
b.HasOne("Heimdall.Domain.Entities.Agent", "Agent")
|
||||
.WithMany()
|
||||
.HasForeignKey("AgentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Agent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Heimdall.Domain.Entities.ApiKey", b =>
|
||||
{
|
||||
b.HasOne("Heimdall.Domain.Entities.Site", "Site")
|
||||
|
||||
Reference in new issue
Block a user