sozsoft-platform/configs/seeds/sql/object/Hr_T_DisciplinaryCase.sql
2026-10-05 15:58:59 +03:00

32 lines
No EOL
1.3 KiB
Transact-SQL

IF OBJECT_ID(N'[dbo].[Hr_T_DisciplinaryCase]', 'U') IS NULL
BEGIN
CREATE TABLE [dbo].[Hr_T_DisciplinaryCase]
(
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
[TenantId] uniqueidentifier NULL,
[CaseNo] nvarchar(32) NULL,
[UserId] uniqueidentifier NOT NULL,
[DepartmentId] uniqueidentifier NULL,
[JobPositionId] uniqueidentifier NULL,
[IncidentDate] date NOT NULL,
[IncidentTime] datetime NULL,
[IncidentPlace] nvarchar(256) NULL,
[Subject] nvarchar(256) NOT NULL,
[IncidentDescription] nvarchar(MAX) NOT NULL,
[WitnessUserIds] nvarchar(MAX) NULL,
[ReportedById] uniqueidentifier NULL,
[Status] nvarchar(32) NOT NULL DEFAULT 'Open',
[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_DisciplinaryCase] 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