feat: add payment sdk and tenant secret foundation

This commit is contained in:
xiong
2026-07-26 19:28:04 +08:00
parent 28befc57be
commit 5503d7a644
17 changed files with 16330 additions and 1 deletions

View File

@@ -21,6 +21,24 @@ internal sealed class TenantAuthProviderConfiguration : IEntityTypeConfiguration
}
}
internal sealed class TenantSecretConfiguration : IEntityTypeConfiguration<TenantSecret>
{
public void Configure(EntityTypeBuilder<TenantSecret> builder)
{
builder.ConfigureTenantEntity("tenant_secrets");
builder.ConfigureTimestamps();
builder.Property(entity => entity.Purpose).HasMaxLength(80);
builder.Property(entity => entity.Provider).HasMaxLength(50);
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.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 });
}
}
internal sealed class SmsVerificationCodeConfiguration : IEntityTypeConfiguration<SmsVerificationCode>
{
public void Configure(EntityTypeBuilder<SmsVerificationCode> builder)