1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-23 12:31:06 -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 string GatewaySubscriptionId { get; set; }
public bool Enabled { get; set; } = true; public bool Enabled { get; set; } = true;
public string LicenseKey { get; set; } public string LicenseKey { get; set; }
public DateTime? ExpirationDate { get; set; }
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow; public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
public DateTime RevisionDate { 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 PublicKey { get; set; }
public string PrivateKey { get; set; } public string PrivateKey { get; set; }
public bool Premium { get; set; } public bool Premium { get; set; }
public DateTime? PremiumExpirationDate { get; set; }
public long? Storage { get; set; } public long? Storage { get; set; }
public short? MaxStorageGb { get; set; } public short? MaxStorageGb { get; set; }
public GatewayType? Gateway { get; set; } public GatewayType? Gateway { get; set; }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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