sozsoft-platform/configs/seeds/host/sql/object/Hr_T_TrainingParticipant.sql
2026-10-02 09:07:01 +03:00

30 lines
No EOL
1.3 KiB
Transact-SQL

IF OBJECT_ID(N'[dbo].[Hr_T_TrainingParticipant]', 'U') IS NULL
BEGIN
CREATE TABLE [dbo].[Hr_T_TrainingParticipant]
(
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
[TenantId] uniqueidentifier NULL,
[TrainingId] uniqueidentifier NOT NULL,
[UserId] uniqueidentifier NOT NULL,
[HireDate] date NULL,
[DepartmentId] uniqueidentifier NULL,
[JobPositionId] uniqueidentifier NULL,
[AttendanceStatus] nvarchar(16) NOT NULL DEFAULT 'Attended',
[EvaluationScore] decimal(18, 4) NULL,
[ExamScore] decimal(18, 4) NULL,
[LeaveDate] date NULL,
[Note] nvarchar(MAX) 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_TrainingParticipant] 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