forked from gongxuegit/tiku-backend.net
feat: add payment sdk and tenant secret foundation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user