2026-10-19 14:35:08 +00:00
|
|
|
IF OBJECT_ID(N'[dbo].[Stk_T_BomComponent]', 'U') IS NULL
|
2026-10-07 20:27:23 +00:00
|
|
|
BEGIN
|
2026-10-19 14:35:08 +00:00
|
|
|
CREATE TABLE [dbo].[Stk_T_BomComponent]
|
2026-10-07 20:27:23 +00:00
|
|
|
(
|
|
|
|
|
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
|
|
|
|
|
[TenantId] uniqueidentifier NULL,
|
|
|
|
|
[BomId] uniqueidentifier NOT NULL,
|
|
|
|
|
[ProductId] uniqueidentifier NOT NULL,
|
|
|
|
|
[VariantKey] nvarchar(450) NULL,
|
|
|
|
|
[Quantity] decimal(18, 4) NOT NULL DEFAULT 1,
|
|
|
|
|
[UomId] nvarchar(64) NOT NULL,
|
|
|
|
|
[BomOperationId] uniqueidentifier NULL,
|
|
|
|
|
[SortOrder] int NOT NULL DEFAULT 0,
|
|
|
|
|
[CreationTime] datetime2 NOT NULL DEFAULT GETUTCDATE(),
|
|
|
|
|
[CreatorId] uniqueidentifier NULL,
|
|
|
|
|
[LastModificationTime] datetime2 NULL,
|
|
|
|
|
[LastModifierId] uniqueidentifier NULL,
|
|
|
|
|
[IsDeleted] bit NOT NULL DEFAULT 0,
|
|
|
|
|
[DeletionTime] datetime2 NULL,
|
|
|
|
|
[DeleterId] uniqueidentifier NULL,
|
2026-10-19 14:35:08 +00:00
|
|
|
CONSTRAINT [PK_Stk_T_BomComponent] PRIMARY KEY NONCLUSTERED
|
2026-10-07 20:27:23 +00:00
|
|
|
(
|
|
|
|
|
[Id] ASC
|
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
END
|
|
|
|
|
GO
|