1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-06 02:22: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:
Matt Gibson
2021-11-08 17:01:09 -06:00
committed by GitHub
parent cba0196859
commit 6357514064
42 changed files with 1060 additions and 188 deletions

View File

@ -593,6 +593,10 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<bool>("CloudSponsor")
.HasColumnType("tinyint(1)");
b.Property<string>("FriendlyName")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<Guid?>("InstallationId")
.HasColumnType("char(36)");
@ -609,10 +613,10 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<Guid?>("SponsoredOrganizationId")
.HasColumnType("char(36)");
b.Property<Guid>("SponsoringOrganizationId")
b.Property<Guid?>("SponsoringOrganizationId")
.HasColumnType("char(36)");
b.Property<Guid>("SponsoringOrganizationUserId")
b.Property<Guid?>("SponsoringOrganizationUserId")
.HasColumnType("char(36)");
b.Property<DateTime?>("SponsorshipLapsedDate")
@ -1354,9 +1358,7 @@ namespace Bit.MySqlMigrations.Migrations
b.HasOne("Bit.Core.Models.EntityFramework.Organization", "SponsoringOrganization")
.WithMany()
.HasForeignKey("SponsoringOrganizationId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.HasForeignKey("SponsoringOrganizationId");
b.Navigation("Installation");