sozsoft-platform/configs/seeds/sql/object/Stk_T_AttributeValue.sql
2026-10-19 17:35:08 +03:00

27 lines
No EOL
1.1 KiB
Transact-SQL

IF OBJECT_ID(N'[dbo].[Stk_T_AttributeValue]', 'U') IS NULL
BEGIN
CREATE TABLE [dbo].[Stk_T_AttributeValue]
(
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
[TenantId] uniqueidentifier NULL,
[AttributeId] uniqueidentifier NOT NULL,
[Name] nvarchar(128) NOT NULL,
[IsCustom] bit NOT NULL DEFAULT 0,
[ExtraPrice] decimal(18, 4) NOT NULL DEFAULT 0,
[ColorCode] nvarchar(16) NULL,
[SortOrder] int NOT NULL DEFAULT 0,
[IsActive] bit NOT NULL DEFAULT 1,
[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,
CONSTRAINT [PK_Stk_T_AttributeValue] PRIMARY KEY NONCLUSTERED
(
[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