30 lines
No EOL
1.2 KiB
Transact-SQL
30 lines
No EOL
1.2 KiB
Transact-SQL
IF OBJECT_ID(N'[dbo].[Hr_T_Visitor]', 'U') IS NULL
|
|
BEGIN
|
|
CREATE TABLE [dbo].[Hr_T_Visitor]
|
|
(
|
|
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
|
|
[TenantId] uniqueidentifier NULL,
|
|
[BranchId] uniqueidentifier NOT NULL,
|
|
[VisitorType] nvarchar(50) NOT NULL DEFAULT 'Ziyaretçi',
|
|
[VisitDate] date NOT NULL,
|
|
[EntryTime] datetime NOT NULL,
|
|
[ExitTime] datetime NULL,
|
|
[CardNo] nvarchar(20) NULL,
|
|
[VisitorFullName] nvarchar(200) NOT NULL,
|
|
[VisitedUserId] uniqueidentifier NOT NULL,
|
|
[CompanyName] nvarchar(200) NULL,
|
|
[VisitReason] 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_Visitor] 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 |