1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 13:13:24 +00:00

[EC-427] Add columns 'Type' and 'BillingPhone' to Provider table

This commit is contained in:
Rui Tome
2022-12-26 17:03:24 +00:00
parent c39fb8f7af
commit 81027a6bc1
7 changed files with 201 additions and 1 deletions

View File

@@ -14,8 +14,10 @@ public class Provider : ITableObject<Guid>
public string BusinessCountry { get; set; }
public string BusinessTaxNumber { get; set; }
public string BillingEmail { get; set; }
public string BillingPhone { get; set; }
public ProviderStatusType Status { get; set; }
public bool UseEvents { get; set; }
public ProviderType Type { get; set; }
public bool Enabled { get; set; } = true;
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;

View File

@@ -0,0 +1,7 @@
namespace Bit.Core.Enums.Provider;
public enum ProviderType : byte
{
Msp = 0,
Reseller = 1,
}

View File

@@ -8,7 +8,9 @@
@BusinessCountry VARCHAR(2),
@BusinessTaxNumber NVARCHAR(30),
@BillingEmail NVARCHAR(256),
@BillingPhone NVARCHAR(50),
@Status TINYINT,
@Type TINYINT,
@UseEvents BIT,
@Enabled BIT,
@CreationDate DATETIME2(7),
@@ -28,7 +30,9 @@ BEGIN
[BusinessCountry],
[BusinessTaxNumber],
[BillingEmail],
[BillingPhone],
[Status],
[Type],
[UseEvents],
[Enabled],
[CreationDate],
@@ -45,7 +49,9 @@ BEGIN
@BusinessCountry,
@BusinessTaxNumber,
@BillingEmail,
@BillingPhone,
@Status,
@Type,
@UseEvents,
@Enabled,
@CreationDate,

View File

@@ -8,7 +8,9 @@
@BusinessCountry VARCHAR(2),
@BusinessTaxNumber NVARCHAR(30),
@BillingEmail NVARCHAR(256),
@BillingPhone NVARCHAR(50),
@Status TINYINT,
@Type TINYINT,
@UseEvents BIT,
@Enabled BIT,
@CreationDate DATETIME2(7),
@@ -28,7 +30,9 @@ BEGIN
[BusinessCountry] = @BusinessCountry,
[BusinessTaxNumber] = @BusinessTaxNumber,
[BillingEmail] = @BillingEmail,
[BillingPhone] = @BillingPhone,
[Status] = @Status,
[Type] = @Type,
[UseEvents] = @UseEvents,
[Enabled] = @Enabled,
[CreationDate] = @CreationDate,

View File

@@ -8,8 +8,10 @@
[BusinessCountry] VARCHAR (2) NULL,
[BusinessTaxNumber] NVARCHAR (30) NULL,
[BillingEmail] NVARCHAR (256) NULL,
[BillingPhone] NVARCHAR (50) NULL,
[Status] TINYINT NOT NULL,
[UseEvents] BIT NOT NULL,
[Type] TINYINT NOT NULL,
[Enabled] BIT NOT NULL,
[CreationDate] DATETIME2 (7) NOT NULL,
[RevisionDate] DATETIME2 (7) NOT NULL,

View File

@@ -10,7 +10,8 @@ SELECT
P.[Enabled],
PU.[Permissions],
P.[UseEvents],
P.[Status] ProviderStatus
P.[Status] ProviderStatus,
P.[Type] ProviderType
FROM
[dbo].[ProviderUser] PU
LEFT JOIN