1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

billing fixes and added gateway to subscriber

This commit is contained in:
Kyle Spearrin
2017-07-28 14:24:07 -04:00
parent 082b53e133
commit cfc80f8d1e
19 changed files with 269 additions and 123 deletions

View File

@ -12,8 +12,9 @@
@UseTotp BIT,
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@StripeCustomerId VARCHAR(50),
@StripeSubscriptionId VARCHAR(50),
@Gateway TINYINT,
@GatewayCustomerId VARCHAR(50),
@GatewaySubscriptionId VARCHAR(50),
@Enabled BIT,
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7)
@ -36,8 +37,9 @@ BEGIN
[UseTotp],
[Storage],
[MaxStorageGb],
[StripeCustomerId],
[StripeSubscriptionId],
[Gateway],
[GatewayCustomerId],
[GatewaySubscriptionId],
[Enabled],
[CreationDate],
[RevisionDate]
@ -57,8 +59,9 @@ BEGIN
@UseTotp,
@Storage,
@MaxStorageGb,
@StripeCustomerId,
@StripeSubscriptionId,
@Gateway,
@GatewayCustomerId,
@GatewaySubscriptionId,
@Enabled,
@CreationDate,
@RevisionDate

View File

@ -12,8 +12,9 @@
@UseTotp BIT,
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@StripeCustomerId VARCHAR(50),
@StripeSubscriptionId VARCHAR(50),
@Gateway TINYINT,
@GatewayCustomerId VARCHAR(50),
@GatewaySubscriptionId VARCHAR(50),
@Enabled BIT,
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7)
@ -37,8 +38,9 @@ BEGIN
[UseTotp] = @UseTotp,
[Storage] = @Storage,
[MaxStorageGb] = @MaxStorageGb,
[StripeCustomerId] = @StripeCustomerId,
[StripeSubscriptionId] = @StripeSubscriptionId,
[Gateway] = @Gateway,
[GatewayCustomerId] = @GatewayCustomerId,
[GatewaySubscriptionId] = @GatewaySubscriptionId,
[Enabled] = @Enabled,
[CreationDate] = @CreationDate,
[RevisionDate] = @RevisionDate

View File

@ -18,8 +18,9 @@
@Premium BIT,
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@StripeCustomerId VARCHAR(50),
@StripeSubscriptionId VARCHAR(50),
@Gateway TINYINT,
@GatewayCustomerId VARCHAR(50),
@GatewaySubscriptionId VARCHAR(50),
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7)
AS
@ -47,8 +48,9 @@ BEGIN
[Premium],
[Storage],
[MaxStorageGb],
[StripeCustomerId],
[StripeSubscriptionId],
[Gateway],
[GatewayCustomerId],
[GatewaySubscriptionId],
[CreationDate],
[RevisionDate]
)
@ -73,8 +75,9 @@ BEGIN
@Premium,
@Storage,
@MaxStorageGb,
@StripeCustomerId,
@StripeSubscriptionId,
@Gateway,
@GatewayCustomerId,
@GatewaySubscriptionId,
@CreationDate,
@RevisionDate
)

View File

@ -18,8 +18,9 @@
@Premium BIT,
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@StripeCustomerId VARCHAR(50),
@StripeSubscriptionId VARCHAR(50),
@Gateway TINYINT,
@GatewayCustomerId VARCHAR(50),
@GatewaySubscriptionId VARCHAR(50),
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7)
AS
@ -47,8 +48,9 @@ BEGIN
[Premium] = @Premium,
[Storage] = @Storage,
[MaxStorageGb] = @MaxStorageGb,
[StripeCustomerId] = @StripeCustomerId,
[StripeSubscriptionId] = @StripeSubscriptionId,
[Gateway] = @Gateway,
[GatewayCustomerId] = @GatewayCustomerId,
[GatewaySubscriptionId] = @GatewaySubscriptionId,
[CreationDate] = @CreationDate,
[RevisionDate] = @RevisionDate
WHERE

View File

@ -1,22 +1,23 @@
CREATE TABLE [dbo].[Organization] (
[Id] UNIQUEIDENTIFIER NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
[BusinessName] NVARCHAR (50) NULL,
[BillingEmail] NVARCHAR (50) NOT NULL,
[Plan] NVARCHAR (50) NOT NULL,
[PlanType] TINYINT NOT NULL,
[Seats] SMALLINT NULL,
[MaxCollections] SMALLINT NULL,
[UseGroups] BIT NOT NULL,
[UseDirectory] BIT NOT NULL,
[UseTotp] BIT NOT NULL,
[Storage] BIGINT NULL,
[MaxStorageGb] SMALLINT NULL,
[StripeCustomerId] VARCHAR (50) NULL,
[StripeSubscriptionId] VARCHAR (50) NULL,
[Enabled] BIT NOT NULL,
[CreationDate] DATETIME2 (7) NOT NULL,
[RevisionDate] DATETIME2 (7) NOT NULL,
[Id] UNIQUEIDENTIFIER NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
[BusinessName] NVARCHAR (50) NULL,
[BillingEmail] NVARCHAR (50) NOT NULL,
[Plan] NVARCHAR (50) NOT NULL,
[PlanType] TINYINT NOT NULL,
[Seats] SMALLINT NULL,
[MaxCollections] SMALLINT NULL,
[UseGroups] BIT NOT NULL,
[UseDirectory] BIT NOT NULL,
[UseTotp] BIT NOT NULL,
[Storage] BIGINT NULL,
[MaxStorageGb] SMALLINT NULL,
[Gateway] TINYINT NULL,
[GatewayCustomerId] VARCHAR (50) NULL,
[GatewaySubscriptionId] VARCHAR (50) NULL,
[Enabled] BIT NOT NULL,
[CreationDate] DATETIME2 (7) NOT NULL,
[RevisionDate] DATETIME2 (7) NOT NULL,
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)
);

View File

@ -18,8 +18,9 @@
[Premium] BIT NOT NULL,
[Storage] BIGINT NULL,
[MaxStorageGb] SMALLINT NULL,
[StripeCustomerId] VARCHAR (50) NULL,
[StripeSubscriptionId] VARCHAR (50) NULL,
[Gateway] TINYINT NULL,
[GatewayCustomerId] VARCHAR (50) NULL,
[GatewaySubscriptionId] VARCHAR (50) NULL,
[CreationDate] DATETIME2 (7) NOT NULL,
[RevisionDate] DATETIME2 (7) NOT NULL,
CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED ([Id] ASC)