forked from gongxuegit/tiku-backend.net
feat: establish dotnet engineering foundation
This commit is contained in:
@@ -32,10 +32,14 @@ internal sealed class TenantSecretConfiguration : IEntityTypeConfiguration<Tenan
|
||||
builder.Property(entity => entity.SecretKey).HasMaxLength(120);
|
||||
builder.Property(entity => entity.SecretRef).HasMaxLength(300);
|
||||
builder.Property(entity => entity.Status).HasSnakeCaseEnum();
|
||||
builder.Property(entity => entity.SecretPayload).IsJson("{}");
|
||||
builder.Property(entity => entity.EncryptionKeyId).HasMaxLength(100);
|
||||
builder.HasIndex(entity => new { entity.TenantId, entity.SecretRef }).IsUnique();
|
||||
builder.HasIndex(entity => new { entity.TenantId, entity.Purpose, entity.Provider, entity.SecretKey }).IsUnique();
|
||||
builder.HasIndex(entity => new { entity.TenantId, entity.Purpose, entity.Provider, entity.Status });
|
||||
builder.ToTable(table => table.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 <> ''"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user