1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-08 06:28:14 -05:00

adjust plans and add max subvaults to orgs

This commit is contained in:
Kyle Spearrin 2017-04-07 16:25:17 -04:00
parent 7e093a73be
commit e3cc1b9411
6 changed files with 9 additions and 7 deletions

View File

@ -18,8 +18,6 @@ namespace Bit.Core.Models.StaticStore
public decimal UserMonthlyPrice { get; set; } public decimal UserMonthlyPrice { get; set; }
public decimal BaseAnnualPrice { get; set; } public decimal BaseAnnualPrice { get; set; }
public decimal UserAnnualPrice { get; set; } public decimal UserAnnualPrice { get; set; }
public TimeSpan? Trial { get; set; }
public Func<DateTime, TimeSpan> Cycle { get; set; }
public bool Disabled { get; set; } public bool Disabled { get; set; }
} }
} }

View File

@ -13,6 +13,7 @@ namespace Bit.Core.Models.Table
public string Plan { get; set; } public string Plan { get; set; }
public PlanType PlanType { get; set; } public PlanType PlanType { get; set; }
public short MaxUsers { get; set; } public short MaxUsers { get; set; }
public short? MaxSubvaults { get; set; }
public string StripeCustomerId { get; set; } public string StripeCustomerId { get; set; }
public string StripeSubscriptionId { get; set; } public string StripeSubscriptionId { get; set; }
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow; public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;

View File

@ -94,7 +94,7 @@ namespace Bit.Core.Utilities
new Plan new Plan
{ {
Type = PlanType.Free, Type = PlanType.Free,
BaseUsers = 1, BaseUsers = 2,
CanBuyAdditionalUsers = false, CanBuyAdditionalUsers = false,
Name = "Free" Name = "Free"
}, },
@ -105,8 +105,7 @@ namespace Bit.Core.Utilities
BaseAnnualPrice = 12, BaseAnnualPrice = 12,
UserAnnualPrice = 12, UserAnnualPrice = 12,
CanBuyAdditionalUsers = true, CanBuyAdditionalUsers = true,
Trial = new TimeSpan(14, 0, 0, 0), CanMonthly = false,
Cycle = now => now.AddYears(1) - now,
Name = "Personal", Name = "Personal",
StripeAnnualPlanId = "personal-annual", StripeAnnualPlanId = "personal-annual",
StripeAnnualUserPlanId = "personal-user-annual" StripeAnnualUserPlanId = "personal-user-annual"
@ -121,8 +120,6 @@ namespace Bit.Core.Utilities
UserMonthlyPrice = 2.5M, UserMonthlyPrice = 2.5M,
CanBuyAdditionalUsers = true, CanBuyAdditionalUsers = true,
CanMonthly = true, CanMonthly = true,
Trial = new TimeSpan(14, 0, 0, 0),
Cycle = now => now.AddMonths(1) - now,
Name = "Teams", Name = "Teams",
StripeAnnualPlanId = "teams-annual", StripeAnnualPlanId = "teams-annual",
StripeAnnualUserPlanId = "teams-user-annual", StripeAnnualUserPlanId = "teams-user-annual",

View File

@ -6,6 +6,7 @@
@Plan NVARCHAR(20), @Plan NVARCHAR(20),
@PlanType TINYINT, @PlanType TINYINT,
@MaxUsers SMALLINT, @MaxUsers SMALLINT,
@MaxSubvaults SMALLINT,
@StripeCustomerId VARCHAR(50), @StripeCustomerId VARCHAR(50),
@StripeSubscriptionId VARCHAR(50), @StripeSubscriptionId VARCHAR(50),
@CreationDate DATETIME2(7), @CreationDate DATETIME2(7),
@ -23,6 +24,7 @@ BEGIN
[Plan], [Plan],
[PlanType], [PlanType],
[MaxUsers], [MaxUsers],
[MaxSubvaults],
[StripeCustomerId], [StripeCustomerId],
[StripeSubscriptionId], [StripeSubscriptionId],
[CreationDate], [CreationDate],
@ -37,6 +39,7 @@ BEGIN
@Plan, @Plan,
@PlanType, @PlanType,
@MaxUsers, @MaxUsers,
@MaxSubvaults,
@StripeCustomerId, @StripeCustomerId,
@StripeSubscriptionId, @StripeSubscriptionId,
@CreationDate, @CreationDate,

View File

@ -6,6 +6,7 @@
@Plan NVARCHAR(20), @Plan NVARCHAR(20),
@PlanType TINYINT, @PlanType TINYINT,
@MaxUsers SMALLINT, @MaxUsers SMALLINT,
@MaxSubvaults SMALLINT,
@StripeCustomerId VARCHAR(50), @StripeCustomerId VARCHAR(50),
@StripeSubscriptionId VARCHAR(50), @StripeSubscriptionId VARCHAR(50),
@CreationDate DATETIME2(7), @CreationDate DATETIME2(7),
@ -24,6 +25,7 @@ BEGIN
[Plan] = @Plan, [Plan] = @Plan,
[PlanType] = @PlanType, [PlanType] = @PlanType,
[MaxUsers] = @MaxUsers, [MaxUsers] = @MaxUsers,
[MaxSubvaults] = @MaxSubvaults,
[StripeCustomerId] = @StripeCustomerId, [StripeCustomerId] = @StripeCustomerId,
[StripeSubscriptionId] = @StripeSubscriptionId, [StripeSubscriptionId] = @StripeSubscriptionId,
[CreationDate] = @CreationDate, [CreationDate] = @CreationDate,

View File

@ -6,6 +6,7 @@
[Plan] NVARCHAR (20) NOT NULL, [Plan] NVARCHAR (20) NOT NULL,
[PlanType] TINYINT NOT NULL, [PlanType] TINYINT NOT NULL,
[MaxUsers] SMALLINT NULL, [MaxUsers] SMALLINT NULL,
[MaxSubvaults] SMALLINT NULL,
[StripeCustomerId] VARCHAR (50) NULL, [StripeCustomerId] VARCHAR (50) NULL,
[StripeSubscriptionId] VARCHAR (50) NULL, [StripeSubscriptionId] VARCHAR (50) NULL,
[CreationDate] DATETIME2 (7) NOT NULL, [CreationDate] DATETIME2 (7) NOT NULL,