search and ai stabilization work, localization stablized.

This commit is contained in:
master
2026-02-24 23:29:36 +02:00
parent 4f947a8b61
commit b07d27772e
766 changed files with 55299 additions and 3221 deletions

View File

@@ -23,6 +23,10 @@ public partial class PlatformDbContext : DbContext
public virtual DbSet<UiContextPreference> UiContextPreferences { get; set; }
public virtual DbSet<PlatformTranslation> Translations { get; set; }
public virtual DbSet<IdentityProviderConfig> IdentityProviderConfigs { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
var schemaName = _schemaName;
@@ -111,6 +115,88 @@ public partial class PlatformDbContext : DbContext
.HasColumnName("updated_by");
});
modelBuilder.Entity<PlatformTranslation>(entity =>
{
entity.HasKey(e => e.Id).HasName("translations_pkey");
entity.ToTable("translations", schemaName);
entity.HasIndex(e => new { e.TenantId, e.Locale, e.Key }, "ux_translations_tenant_locale_key")
.IsUnique();
entity.HasIndex(e => new { e.TenantId, e.Locale }, "ix_translations_tenant_locale");
entity.Property(e => e.Id)
.HasColumnName("id")
.UseIdentityAlwaysColumn();
entity.Property(e => e.Locale)
.HasMaxLength(10)
.HasColumnName("locale");
entity.Property(e => e.Key)
.HasMaxLength(512)
.HasColumnName("key");
entity.Property(e => e.Value)
.HasColumnName("value");
entity.Property(e => e.TenantId)
.HasMaxLength(128)
.HasDefaultValue("_system")
.HasColumnName("tenant_id");
entity.Property(e => e.UpdatedBy)
.HasMaxLength(256)
.HasColumnName("updated_by");
entity.Property(e => e.UpdatedAt)
.HasDefaultValueSql("now()")
.HasColumnName("updated_at");
});
modelBuilder.Entity<IdentityProviderConfig>(entity =>
{
entity.HasKey(e => e.Id).HasName("identity_provider_configs_pkey");
entity.ToTable("identity_provider_configs", schemaName);
entity.HasIndex(e => new { e.TenantId, e.Name }, "ux_idp_configs_tenant_name")
.IsUnique();
entity.HasIndex(e => new { e.TenantId, e.Type }, "ix_idp_configs_tenant_type");
entity.Property(e => e.Id)
.HasColumnName("id")
.HasDefaultValueSql("gen_random_uuid()");
entity.Property(e => e.TenantId)
.HasMaxLength(128)
.HasColumnName("tenant_id");
entity.Property(e => e.Name)
.HasMaxLength(256)
.HasColumnName("name");
entity.Property(e => e.Type)
.HasMaxLength(50)
.HasColumnName("type");
entity.Property(e => e.Enabled)
.HasDefaultValue(true)
.HasColumnName("enabled");
entity.Property(e => e.ConfigurationJson)
.HasColumnType("jsonb")
.HasColumnName("configuration_json");
entity.Property(e => e.Description)
.HasMaxLength(1024)
.HasColumnName("description");
entity.Property(e => e.CreatedAt)
.HasDefaultValueSql("now()")
.HasColumnName("created_at");
entity.Property(e => e.UpdatedAt)
.HasDefaultValueSql("now()")
.HasColumnName("updated_at");
entity.Property(e => e.CreatedBy)
.HasMaxLength(256)
.HasDefaultValueSql("'system'")
.HasColumnName("created_by");
entity.Property(e => e.UpdatedBy)
.HasMaxLength(256)
.HasDefaultValueSql("'system'")
.HasColumnName("updated_by");
});
OnModelCreatingPartial(modelBuilder);
}

View File

@@ -0,0 +1,28 @@
using System;
namespace StellaOps.Platform.Database.EfCore.Models;
public partial class IdentityProviderConfig
{
public Guid Id { get; set; }
public string TenantId { get; set; } = null!;
public string Name { get; set; } = null!;
public string Type { get; set; } = null!;
public bool Enabled { get; set; }
public string ConfigurationJson { get; set; } = null!;
public string? Description { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public string CreatedBy { get; set; } = null!;
public string UpdatedBy { get; set; } = null!;
}

View File

@@ -0,0 +1,20 @@
using System;
namespace StellaOps.Platform.Database.EfCore.Models;
public partial class PlatformTranslation
{
public long Id { get; set; }
public string Locale { get; set; } = null!;
public string Key { get; set; } = null!;
public string Value { get; set; } = null!;
public string TenantId { get; set; } = "_system";
public string UpdatedBy { get; set; } = null!;
public DateTime UpdatedAt { get; set; }
}

View File

@@ -0,0 +1,18 @@
-- SPRINT_20260224_001 / LOC-002
-- Platform localization overrides table used by /platform/i18n and /api/v1/platform/localization/*.
CREATE SCHEMA IF NOT EXISTS platform;
CREATE TABLE IF NOT EXISTS platform.translations (
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
locale VARCHAR(10) NOT NULL,
key VARCHAR(512) NOT NULL,
value TEXT NOT NULL,
tenant_id VARCHAR(128) NOT NULL DEFAULT '_system',
updated_by VARCHAR(256) NOT NULL,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
CONSTRAINT ux_translations_tenant_locale_key UNIQUE (tenant_id, locale, key)
);
CREATE INDEX IF NOT EXISTS ix_translations_tenant_locale
ON platform.translations (tenant_id, locale);