feat: establish dotnet engineering foundation

This commit is contained in:
2026-07-27 15:00:14 +08:00
parent 60a376ea0b
commit 28e9a9fa41
36 changed files with 17301 additions and 89 deletions

View File

@@ -12958,6 +12958,27 @@ namespace Tiku.Infrastructure.Persistence.Migrations
.HasColumnName("created_at")
.HasDefaultValueSql("now()");
b.Property<byte[]>("EncryptedPayload")
.IsRequired()
.HasColumnType("bytea")
.HasColumnName("encrypted_payload");
b.Property<string>("EncryptionKeyId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("encryption_key_id");
b.Property<byte[]>("EncryptionNonce")
.IsRequired()
.HasColumnType("bytea")
.HasColumnName("encryption_nonce");
b.Property<byte[]>("EncryptionTag")
.IsRequired()
.HasColumnType("bytea")
.HasColumnName("encryption_tag");
b.Property<DateTimeOffset?>("ExpiresAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("expires_at");
@@ -12984,12 +13005,6 @@ namespace Tiku.Infrastructure.Persistence.Migrations
.HasColumnType("character varying(120)")
.HasColumnName("secret_key");
b.Property<JsonElement>("SecretPayload")
.ValueGeneratedOnAdd()
.HasColumnType("jsonb")
.HasColumnName("secret_payload")
.HasDefaultValueSql("'{}'::jsonb");
b.Property<string>("SecretRef")
.IsRequired()
.HasMaxLength(300)
@@ -13029,7 +13044,10 @@ namespace Tiku.Infrastructure.Persistence.Migrations
b.HasIndex("TenantId", "Purpose", "Provider", "Status")
.HasDatabaseName("ix_tenant_secrets_tenant_id_purpose_provider_status");
b.ToTable("tenant_secrets", (string)null);
b.ToTable("tenant_secrets", null, t =>
{
t.HasCheckConstraint("ck_tenant_secrets_encryption_envelope", "octet_length(encrypted_payload) > 0 and octet_length(encryption_nonce) = 12 and octet_length(encryption_tag) = 16 and encryption_key_id <> ''");
});
});
modelBuilder.Entity("Tiku.Domain.Tenancy.TenantSettings", b =>