
--Migration_RCCP_20230607_110645.txt
CREATE TABLE [dbo].[CompanySupportContractSubscriptions] (
    [Id] [bigint] NOT NULL IDENTITY,
    [CompanyId] [bigint] NOT NULL,
    [PlanId] [bigint] NOT NULL,
    [StartedUtcDateTime] [datetime] NOT NULL,
    [EndedUtcDateTime] [datetime],
    CONSTRAINT [PK_dbo.CompanySupportContractSubscriptions] PRIMARY KEY ([Id])
)
CREATE TABLE [dbo].[DeviceUsages] (
    [ID] [bigint] NOT NULL IDENTITY,
    [CompanyId] [bigint] NOT NULL,
    [ProductType] [int] NOT NULL,
    [DeviceSerial] [nvarchar](max),
    [StartedUtcDateTime] [datetime] NOT NULL,
    [EndedUtcDateTime] [datetime],
    CONSTRAINT [PK_dbo.DeviceUsages] PRIMARY KEY ([ID])
)
CREATE TABLE [dbo].[ProductSupportServicePrices] (
    [Id] [bigint] NOT NULL IDENTITY,
    [ProductType] [int] NOT NULL,
    [Price] [decimal](18, 2) NOT NULL,
    [ServicePlanId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.ProductSupportServicePrices] PRIMARY KEY ([Id])
)
CREATE TABLE [dbo].[SupportServicePlans] (
    [Id] [bigint] NOT NULL IDENTITY,
    [CompanyId] [bigint] NOT NULL,
    [Name] [nvarchar](max),
    [BasePlanId] [bigint] NOT NULL,
    CONSTRAINT [PK_dbo.SupportServicePlans] PRIMARY KEY ([Id])
)
