mirror of
https://github.com/bitwarden/server
synced 2026-01-20 01:13:18 +00:00
[AC-1900] Update Vault DB to support provider billing (#3875)
* Add Gateway columns to Provider table * Add ProviderId column to Transaction table * Create ProviderPlan table * Matt's feedback * Rui's feedback * Fixed Gateway parameter on Provider
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Bit.Infrastructure.EntityFramework.Billing.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Billing.Configurations;
|
||||
|
||||
public class ProviderPlanEntityTypeConfiguration : IEntityTypeConfiguration<ProviderPlan>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ProviderPlan> builder)
|
||||
{
|
||||
builder
|
||||
.Property(t => t.Id)
|
||||
.ValueGeneratedNever();
|
||||
|
||||
builder
|
||||
.HasIndex(providerPlan => new { providerPlan.Id, providerPlan.PlanType })
|
||||
.IsUnique();
|
||||
|
||||
builder.ToTable(nameof(ProviderPlan));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user