1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-23 04:21:05 -05:00

added new expiration columns to org/users

This commit is contained in:
Kyle Spearrin 2017-08-12 10:43:52 -04:00
parent 46e5cd6486
commit 55ae6f12ad
8 changed files with 14 additions and 0 deletions

View File

@ -27,6 +27,7 @@ namespace Bit.Core.Models.Table
public string GatewaySubscriptionId { get; set; }
public bool Enabled { get; set; } = true;
public string LicenseKey { get; set; }
public DateTime? ExpirationDate { get; set; }
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;

View File

@ -30,6 +30,7 @@ namespace Bit.Core.Models.Table
public string PublicKey { get; set; }
public string PrivateKey { get; set; }
public bool Premium { get; set; }
public DateTime? PremiumExpirationDate { get; set; }
public long? Storage { get; set; }
public short? MaxStorageGb { get; set; }
public GatewayType? Gateway { get; set; }

View File

@ -18,6 +18,7 @@
@GatewaySubscriptionId VARCHAR(50),
@Enabled BIT,
@LicenseKey VARCHAR(100),
@ExpirationDate DATETIME2(7),
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7)
AS
@ -45,6 +46,7 @@ BEGIN
[GatewaySubscriptionId],
[Enabled],
[LicenseKey],
[ExpirationDate],
[CreationDate],
[RevisionDate]
)
@ -69,6 +71,7 @@ BEGIN
@GatewaySubscriptionId,
@Enabled,
@LicenseKey,
@ExpirationDate,
@CreationDate,
@RevisionDate
)

View File

@ -18,6 +18,7 @@
@GatewaySubscriptionId VARCHAR(50),
@Enabled BIT,
@LicenseKey VARCHAR(100),
@ExpirationDate DATETIME2(7),
@CreationDate DATETIME2(7),
@RevisionDate DATETIME2(7)
@ -46,6 +47,7 @@ BEGIN
[GatewaySubscriptionId] = @GatewaySubscriptionId,
[Enabled] = @Enabled,
[LicenseKey] = @LicenseKey,
[ExpirationDate] = @ExpirationDate,
[CreationDate] = @CreationDate,
[RevisionDate] = @RevisionDate
WHERE

View File

@ -16,6 +16,7 @@
@PublicKey NVARCHAR(MAX),
@PrivateKey NVARCHAR(MAX),
@Premium BIT,
@PremiumExpirationDate DATETIME2(7),
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@Gateway TINYINT,
@ -47,6 +48,7 @@ BEGIN
[PublicKey],
[PrivateKey],
[Premium],
[PremiumExpirationDate],
[Storage],
[MaxStorageGb],
[Gateway],
@ -75,6 +77,7 @@ BEGIN
@PublicKey,
@PrivateKey,
@Premium,
@PremiumExpirationDate,
@Storage,
@MaxStorageGb,
@Gateway,

View File

@ -16,6 +16,7 @@
@PublicKey NVARCHAR(MAX),
@PrivateKey NVARCHAR(MAX),
@Premium BIT,
@PremiumExpirationDate DATETIME2(7),
@Storage BIGINT,
@MaxStorageGb SMALLINT,
@Gateway TINYINT,
@ -47,6 +48,7 @@ BEGIN
[PublicKey] = @PublicKey,
[PrivateKey] = @PrivateKey,
[Premium] = @Premium,
[PremiumExpirationDate] = @PremiumExpirationDate,
[Storage] = @Storage,
[MaxStorageGb] = @MaxStorageGb,
[Gateway] = @Gateway,

View File

@ -18,6 +18,7 @@
[GatewaySubscriptionId] VARCHAR (50) NULL,
[Enabled] BIT NOT NULL,
[LicenseKey] VARCHAR (100) NULL,
[ExpirationDate] DATETIME2 (7) NULL,
[CreationDate] DATETIME2 (7) NOT NULL,
[RevisionDate] DATETIME2 (7) NOT NULL,
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC)

View File

@ -16,6 +16,7 @@
[PublicKey] VARCHAR (MAX) NULL,
[PrivateKey] VARCHAR (MAX) NULL,
[Premium] BIT NOT NULL,
[PremiumExpirationDate] DATETIME2 (7) NULL,
[Storage] BIGINT NULL,
[MaxStorageGb] SMALLINT NULL,
[Gateway] TINYINT NULL,