32 lines
No EOL
1.4 KiB
Transact-SQL
32 lines
No EOL
1.4 KiB
Transact-SQL
IF OBJECT_ID(N'[dbo].[Prc_T_PurchaseAgreement]', 'U') IS NULL
|
|
BEGIN
|
|
CREATE TABLE [dbo].[Prc_T_PurchaseAgreement]
|
|
(
|
|
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
|
|
[TenantId] uniqueidentifier NULL,
|
|
[AgreementNo] nvarchar(32) NOT NULL,
|
|
[SupplierId] uniqueidentifier NOT NULL,
|
|
[BranchId] uniqueidentifier NOT NULL,
|
|
[BuyerUserId] uniqueidentifier NOT NULL,
|
|
[AgreementType] nvarchar(16) NOT NULL DEFAULT 'Blanket',
|
|
[CurrencyId] nvarchar(8) NOT NULL DEFAULT 'TRY',
|
|
[StartDate] date NULL,
|
|
[EndDate] date NULL,
|
|
[WarehouseId] uniqueidentifier NOT NULL,
|
|
[OperationTypeId] uniqueidentifier NULL,
|
|
[Terms] nvarchar(MAX) NULL,
|
|
[Status] nvarchar(16) NOT NULL DEFAULT 'Draft',
|
|
[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_Prc_T_PurchaseAgreement] 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 |