2022-07-05 13:54:10 +02:00
|
|
|
|
CREATE TABLE [dbo].[Inventory]
|
|
|
|
|
(
|
|
|
|
|
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
|
|
|
|
|
[ProductId] INT NOT NULL,
|
|
|
|
|
[Quantity] INT NOT NULL DEFAULT 1,
|
|
|
|
|
[PurchasePrice] MONEY NOT NULL,
|
2022-07-23 23:57:12 +02:00
|
|
|
|
[PurchaseDate] DATETIME2 NOT NULL DEFAULT getutcdate(),
|
|
|
|
|
CONSTRAINT [FK_Inventory_ToProduct] FOREIGN KEY (ProductId) REFERENCES Product(Id)
|
2022-07-05 13:54:10 +02:00
|
|
|
|
)
|