1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-23 17:07:42 +01: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 BaseAnnualPrice { get; set; }
public decimal UserAnnualPrice { get; set; }
public TimeSpan? Trial { get; set; }
public Func<DateTime, TimeSpan> Cycle { get; set; }
public bool Disabled { get; set; }
}
}

View File

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

View File

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

View File

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

View File

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

View File

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