mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 01:52:49 -05:00
Families for enterprise/stripe integrations (#1699)
* Add PlanSponsorshipType to static store * Add sponsorship type to token and creates sponsorship * PascalCase properties * Require sponsorship for remove * Create subscription sponsorship helper class * Handle Sponsored subscription changes * Add sponsorship id to subscription metadata * Make sponsoring references nullable This state indicates that a sponsorship has lapsed, but was not able to be reverted for billing reasons * WIP: Validate and remove subscriptions * Update sponsorships on organization and org user delete * Add friendly name to organization sponsorship
This commit is contained in:
@ -597,6 +597,10 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
b.Property<bool>("CloudSponsor")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("FriendlyName")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.Property<Guid?>("InstallationId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
@ -613,10 +617,10 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
b.Property<Guid?>("SponsoredOrganizationId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("SponsoringOrganizationId")
|
||||
b.Property<Guid?>("SponsoringOrganizationId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("SponsoringOrganizationUserId")
|
||||
b.Property<Guid?>("SponsoringOrganizationUserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime?>("SponsorshipLapsedDate")
|
||||
@ -1363,9 +1367,7 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
|
||||
b.HasOne("Bit.Core.Models.EntityFramework.Organization", "SponsoringOrganization")
|
||||
.WithMany()
|
||||
.HasForeignKey("SponsoringOrganizationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.HasForeignKey("SponsoringOrganizationId");
|
||||
|
||||
b.Navigation("Installation");
|
||||
|
||||
|
Reference in New Issue
Block a user