sozsoft-platform/configs/seeds/host/sql/object/Hr_T_VehicleExpenseLine.sql
2026-10-02 10:09:23 +03:00

28 lines
No EOL
1.2 KiB
Transact-SQL

IF OBJECT_ID(N'[dbo].[Hr_T_VehicleExpenseLine]', 'U') IS NULL
BEGIN
CREATE TABLE [dbo].[Hr_T_VehicleExpenseLine]
(
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
[TenantId] uniqueidentifier NULL,
[VehicleExpenseId] uniqueidentifier NOT NULL,
[ExpenseDefinitionId] uniqueidentifier NOT NULL,
[DetailName] nvarchar(128) NULL,
[Quantity] decimal(18, 4) NOT NULL DEFAULT 1,
[Amount] decimal(18, 4) NOT NULL DEFAULT 0,
[DiscountRate] decimal(18, 4) NOT NULL DEFAULT 0,
[NetAmount] decimal(18, 4) NOT NULL DEFAULT 0,
[Description] nvarchar(512) NULL,
[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_Hr_T_VehicleExpenseLine] 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