Tables [dbo].[ConsumableImportedCosts]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:20:01 AM Thursday, March 21, 2019
Last Modified1:20:13 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_ConsumableImportedCosts_ID: IDIDint4
False
1 - 1
PriceTypesmallint2
False
((0))
Foreign Keys FK_ConsumableImportedCosts_DealerID_Account_AccountID: [dbo].[Account].DealerIDDealerIDint4
True
Foreign Keys FK_ConsumableImportedCosts_SupplierID_Supplier_SupplierID: [dbo].[Supplier].SupplierIDSupplierIDint4
True
OEMPartNovarchar(50)50
False
VendorPartNovarchar(50)50
True
Foreign Keys FK_ConsumableImportedCosts_ConsumableTypeID_ConsumableTypes_ID: [dbo].[ConsumableTypes].ConsumableTypeIDConsumableTypeIDint4
True
ConsumableNamenvarchar(100)200
True
Descriptionnvarchar(1024)2048
True
ConsumableYieldint4
True
CoverageFactorfloat8
True
PriceBeforeTaxesfloat8
True
PriceAfterTaxesfloat8
False
CurrencyIDsmallint2
False
((1033))
Voltagesmallint2
False
CustomerDiscountfloat8
True
Validitydatetime8
True
ProductUrlvarchar(1024)1024
True
GraphicUrlvarchar(1024)1024
True
OrderUrlvarchar(1024)1024
True
Tagnvarchar(200)400
True
ImportDatedatetime8
False
LastUpdateDatedatetime8
True
KeyNameKey ColumnsUnique
Cluster Primary Key PK_ConsumableImportedCosts_ID: IDPK_ConsumableImportedCosts_IDID
True
NameDeleteColumns
FK_ConsumableImportedCosts_ConsumableTypeID_ConsumableTypes_IDConsumableTypeID->[dbo].[ConsumableTypes].[ID]
FK_ConsumableImportedCosts_DealerID_Account_AccountIDCascadeDealerID->[dbo].[Account].[AccountID]
FK_ConsumableImportedCosts_SupplierID_Supplier_SupplierIDSupplierID->[dbo].[Supplier].[SupplierID]
CREATE TABLE [dbo].[ConsumableImportedCosts]
(
[ID] [int] NOT NULL IDENTITY(1, 1),
[PriceType] [smallint] NOT NULL CONSTRAINT [DF_ConsumableImportedCosts_PriceType] DEFAULT ((0)),
[DealerID] [int] NULL,
[SupplierID] [int] NULL,
[OEMPartNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VendorPartNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConsumableTypeID] [int] NULL,
[ConsumableName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [nvarchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConsumableYield] [int] NULL,
[CoverageFactor] [float] NULL,
[PriceBeforeTaxes] [float] NULL,
[PriceAfterTaxes] [float] NOT NULL,
[CurrencyID] [smallint] NOT NULL CONSTRAINT [DF_ConsumableImportedCosts_CurrencyID] DEFAULT ((1033)),
[Voltage] [smallint] NOT NULL,
[CustomerDiscount] [float] NULL,
[Validity] [datetime] NULL,
[ProductUrl] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GraphicUrl] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrderUrl] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Tag] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ImportDate] [datetime] NOT NULL,
[LastUpdateDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ConsumableImportedCosts] ADD CONSTRAINT [PK_ConsumableImportedCosts_ID] PRIMARY KEY CLUSTERED  ([ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ConsumableImportedCosts] ADD CONSTRAINT [FK_ConsumableImportedCosts_ConsumableTypeID_ConsumableTypes_ID] FOREIGN KEY ([ConsumableTypeID]) REFERENCES [dbo].[ConsumableTypes] ([ID])
GO
ALTER TABLE [dbo].[ConsumableImportedCosts] ADD CONSTRAINT [FK_ConsumableImportedCosts_DealerID_Account_AccountID] FOREIGN KEY ([DealerID]) REFERENCES [dbo].[Account] ([AccountID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ConsumableImportedCosts] ADD CONSTRAINT [FK_ConsumableImportedCosts_SupplierID_Supplier_SupplierID] FOREIGN KEY ([SupplierID]) REFERENCES [dbo].[Supplier] ([SupplierID])
GO