37 lines
No EOL
1.6 KiB
Transact-SQL
37 lines
No EOL
1.6 KiB
Transact-SQL
IF OBJECT_ID(N'[dbo].[Hr_T_JobPosting]', 'U') IS NULL
|
|
BEGIN
|
|
CREATE TABLE [dbo].[Hr_T_JobPosting]
|
|
(
|
|
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
|
|
[TenantId] uniqueidentifier NULL,
|
|
[PostingNo] nvarchar(32) NULL,
|
|
[StaffRequestId] uniqueidentifier NULL,
|
|
[Title] nvarchar(256) NOT NULL,
|
|
[BranchId] uniqueidentifier NOT NULL,
|
|
[DepartmentId] uniqueidentifier NOT NULL,
|
|
[JobPositionId] uniqueidentifier NOT NULL,
|
|
[Headcount] int NOT NULL DEFAULT 1,
|
|
[EmploymentType] nvarchar(32) NOT NULL DEFAULT 'FullTime',
|
|
[WorkModel] nvarchar(32) NOT NULL DEFAULT 'Office',
|
|
[Location] nvarchar(256) NULL,
|
|
[PublishDate] date NULL,
|
|
[ClosingDate] date NULL,
|
|
[SourceIds] nvarchar(1024) NULL,
|
|
[Description] nvarchar(MAX) NULL,
|
|
[Requirements] nvarchar(MAX) NULL,
|
|
[Status] nvarchar(32) NOT NULL DEFAULT 'Draft',
|
|
[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_Hr_T_JobPosting] 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 |