﻿------------------------------------ Mostafa 2024-03-10 --------------------------------
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Contract
	DROP CONSTRAINT DF_Contract_ContractCode

ALTER TABLE dbo.Contract
	DROP CONSTRAINT DF_Contract_ShowInAssignmentRequest

CREATE TABLE dbo.Tmp_Contract
	(
	ContractCode tinyint NOT NULL IDENTITY (0, 1),
	Name nvarchar(1000) NULL,
	Arabic_Name nvarchar(1000) NULL,
	Period tinyint NULL,
	Probation float(53) NULL,
	ProbationDurationByDays int NULL,
	WDName nvarchar(200) NULL,
	FixedTerm bit NULL,
	Closed bit NULL,
	ContractGroupCode int NULL,
	MappingCode int NULL,
	ShowInAssignmentRequest bit NOT NULL,
	PeriodDurationByDays int NULL,
	ManualExpireDate bit NULL,
	CentralCode int NULL,
	DropDayoffAndHolidays bit NULL,
	SalaryPayWayCode int NULL,
	DropDayoff bit NULL,
	DropHolidays bit NULL,
	CreationDate datetime NULL,
	CreatedBy int NULL,
	ModifiedBy int NULL,
	ModificationDate datetime NULL,
	Serial tinyint NULL
	)  ON [PRIMARY]

ALTER TABLE dbo.Tmp_Contract SET (LOCK_ESCALATION = TABLE)

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_Period DEFAULT ((0)) FOR Period

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_FixedTerm DEFAULT ((0)) FOR FixedTerm

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_Closed DEFAULT ((0)) FOR Closed

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_ShowInAssignmentRequest DEFAULT ((0)) FOR ShowInAssignmentRequest

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_ManualExpireDate DEFAULT ((0)) FOR ManualExpireDate

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_DropDayoffAndHolidays DEFAULT ((0)) FOR DropDayoffAndHolidays

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_DropDayoff DEFAULT ((0)) FOR DropDayoff

ALTER TABLE dbo.Tmp_Contract ADD CONSTRAINT
	DF_Contract_DropHolidays DEFAULT ((0)) FOR DropHolidays

SET IDENTITY_INSERT dbo.Tmp_Contract ON

IF EXISTS(SELECT * FROM dbo.Contract)
	 EXEC('INSERT INTO dbo.Tmp_Contract (ContractCode, Name, Arabic_Name, Period, Probation, ProbationDurationByDays, WDName, FixedTerm, Closed, ContractGroupCode, MappingCode, ShowInAssignmentRequest)
		SELECT ContractCode, Name, Arabic_Name, Period, Probation, ProbationDurationByDays, WDName, FixedTerm, Closed, ContractGroupCode, MappingCode, ShowInAssignmentRequest FROM dbo.Contract WITH (HOLDLOCK TABLOCKX)')

SET IDENTITY_INSERT dbo.Tmp_Contract OFF

ALTER TABLE dbo.Rec_RecruitJob
	DROP CONSTRAINT FK_Rec_RecruitJob_Contract

ALTER TABLE dbo.WF_AssignmentRequests
	DROP CONSTRAINT FK_AssignmentRequest_Contract

ALTER TABLE dbo.WF_RenewContractRequests
	DROP CONSTRAINT FK_RenewContractRequest_Contract

DROP TABLE dbo.Contract

EXECUTE sp_rename N'dbo.Tmp_Contract', N'Contract', 'OBJECT' 

ALTER TABLE dbo.Contract ADD CONSTRAINT
	PK_Contract PRIMARY KEY CLUSTERED 
	(
	ContractCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.WF_RenewContractRequests ADD CONSTRAINT
	FK_RenewContractRequest_Contract FOREIGN KEY
	(
	ContractCode
	) REFERENCES dbo.Contract
	(
	ContractCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  CASCADE 
	

ALTER TABLE dbo.WF_RenewContractRequests SET (LOCK_ESCALATION = TABLE)

COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.WF_AssignmentRequests ADD CONSTRAINT
	FK_AssignmentRequest_Contract FOREIGN KEY
	(
	SubContractCode
	) REFERENCES dbo.Contract
	(
	ContractCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  CASCADE 
	

ALTER TABLE dbo.WF_AssignmentRequests SET (LOCK_ESCALATION = TABLE)

COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Rec_RecruitJob ADD CONSTRAINT
	FK_Rec_RecruitJob_Contract FOREIGN KEY
	(
	ContractCode
	) REFERENCES dbo.Contract
	(
	ContractCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	

ALTER TABLE dbo.Rec_RecruitJob SET (LOCK_ESCALATION = TABLE)

COMMIT


update Contract set Serial=ContractCode
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1049,N'Contract',N'العقد',1023,N'/Personal/Contract',N'Index','fa fa-thumb-tack',N'get',9,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1049,22)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4060,N'العقد',N'Contract',1049,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4061,N'عرض العقد',N'View Contract',1049,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4062,N'إضافة العقد',N'Add Contract',1049,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4063,N'تعديل العقد',N'Edit Contract',1049,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4064,N'حذف العقد',N'Delete Contract',1049,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4065,N'حفظ العقد',N'Save Contract',1049,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1543,N'Personal',N'Contract',N'Index',0,N'get',4060)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1544,N'Personal',N'Contract',N'Contract_Read',0,N'post',4061)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1545,N'Personal',N'Contract',N'Save',1,N'get',4062)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1546,N'Personal',N'Contract',N'Save',2,N'get',4063)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1547,N'Personal',N'Contract',N'Delete',0,N'post',4064)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1548,N'Personal',N'Contract',N'Save',0,N'post',4065)
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1018,NULL, NULL,N'Contract',N'GetContractSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1019,NULL, NULL,N'Contract',N'GetContract',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1020,NULL, NULL,N'Contract',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1021,NULL, NULL,N'Contract',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1022,NULL, NULL,N'Contract',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1023,NULL, NULL,N'Contract',N'Get',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1296,1018,4061, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1297,1019,4061, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1298,1020,4065, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1299,1021,4065, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1300,1022,4064, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1301,1023,4063, NULL)
Go
 ------------------------------------ End 2024-03-10 --------------------------------

 ------------------------------------- M.negm 2024-03-12  ----------------------------
 ALTER TABLE dbo.Insurer ADD
	CreatedBy int NOT NULL CONSTRAINT DF_Insurer_CreatedBy DEFAULT (1),
	CreationDate datetime NOT NULL CONSTRAINT DF_Insurer_CreationDate DEFAULT (getdate()),
	ModifiedBy int NULL,
	ModificationDate datetime NULL
GO

BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Insurer
	DROP CONSTRAINT DF_Insurer_CreatedBy

ALTER TABLE dbo.Insurer
	DROP CONSTRAINT DF_Insurer_CreationDate

CREATE TABLE dbo.Tmp_Insurer
	(
	InsurerCode int NOT NULL IDENTITY (1, 1),
	Name nvarchar(150) NULL,
	Arabic_Name nvarchar(150) NULL,
	CreatedBy int NOT NULL,
	CreationDate datetime NOT NULL,
	ModifiedBy int NULL,
	ModificationDate datetime NULL
	)  ON [PRIMARY]

ALTER TABLE dbo.Tmp_Insurer SET (LOCK_ESCALATION = TABLE)

ALTER TABLE dbo.Tmp_Insurer ADD CONSTRAINT
	DF_Insurer_CreatedBy DEFAULT ((1)) FOR CreatedBy

ALTER TABLE dbo.Tmp_Insurer ADD CONSTRAINT
	DF_Insurer_CreationDate DEFAULT (getdate()) FOR CreationDate

SET IDENTITY_INSERT dbo.Tmp_Insurer ON

IF EXISTS(SELECT * FROM dbo.Insurer)
	 EXEC('INSERT INTO dbo.Tmp_Insurer (InsurerCode, Name, Arabic_Name, CreatedBy, CreationDate, ModifiedBy, ModificationDate)
		SELECT InsurerCode, Name, Arabic_Name, CreatedBy, CreationDate, ModifiedBy, ModificationDate FROM dbo.Insurer WITH (HOLDLOCK TABLOCKX)')

SET IDENTITY_INSERT dbo.Tmp_Insurer OFF

DROP TABLE dbo.Insurer

EXECUTE sp_rename N'dbo.Tmp_Insurer', N'Insurer', 'OBJECT' 

ALTER TABLE dbo.Insurer ADD CONSTRAINT
	PK_Insurer PRIMARY KEY CLUSTERED 
	(
	InsurerCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


COMMIT



ALTER TABLE dbo.Insurer
ADD InsurerNumber nvarchar(150) null ;

ALTER TABLE dbo.Insurer
ADD Closed bit null ;

ALTER TABLE dbo.Insurer
ADD CentralCode int null ;
Go





INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1051,N'Insurer Types',N'جهة التأمين الإجتماعى',1023,N'/Personal/InsurerTypes',N'Index','fa fa-thumb-tack',N'get',11,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1051,22)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4072,N'جهة التأمين الإجتماعى',N'Insurer Types',1051,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4073,N'عرض جهة التأمين الإجتماعى',N'View Insurer Types',1051,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4074,N'إضافة جهة التأمين الإجتماعى',N'Add Insurer Types',1051,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4075,N'تعديل جهة التأمين الإجتماعى',N'Edit Insurer Types',1051,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4076,N'حذف جهة التأمين الإجتماعى',N'Delete Insurer Types',1051,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4077,N'حفظ جهة التأمين الإجتماعى',N'Save Insurer Types',1051,2)
Go




INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1561,N'Personal',N'InsurerTypes',N'Index',0,N'get',4072)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1562,N'Personal',N'InsurerTypes',N'InsurerTypes_Read',0,N'post',4073)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1563,N'Personal',N'InsurerTypes',N'Save',1,N'get',4074)


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1564,N'Personal',N'InsurerTypes',N'Save',2,N'get',4075)


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1565,N'Personal',N'InsurerTypes',N'Delete',0,N'post',4076)


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1566,N'Personal',N'InsurerTypes',N'Save',0,N'post',4077)

-- Api security privilege End Point (script only not added in db Check it and run if you want) 


INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES(1036,NULL, NULL,N'InsurerTypes',N'GetInsurerTypesSearch',N'post')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES(1037,NULL, NULL,N'InsurerTypes',N'GetInsurerTypes',N'Get')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES(1038,NULL, NULL,N'InsurerTypes',N'Put',N'Put')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES(1039,NULL, NULL,N'InsurerTypes',N'post',N'post')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES(1040,NULL, NULL,N'InsurerTypes',N'Delete',N'Delete')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES(1041,NULL, NULL,N'InsurerTypes',N'Get',N'Get')
Go

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1314,1036,4073, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1315,1037,4073, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1316,1038,4077, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1317,1039,4077, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1318,1040,4076, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1319,1041,4075, NULL)
Go


 ------------------------------------------ End 2024-03-12 -------------------------



 ---------------------------------M.negm 2024-03-13 ------------------------------------

BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION

CREATE TABLE dbo.Tmp_DocumentsTypes
	(
	DocumentTypeCode int NOT NULL IDENTITY (1, 1),
	Name nvarchar(30) NULL,
	Arabic_Name nvarchar(30) NULL,
	MDT datetime NULL
	)  ON [PRIMARY]

ALTER TABLE dbo.Tmp_DocumentsTypes SET (LOCK_ESCALATION = TABLE)

SET IDENTITY_INSERT dbo.Tmp_DocumentsTypes ON

IF EXISTS(SELECT * FROM dbo.DocumentsTypes)
	 EXEC('INSERT INTO dbo.Tmp_DocumentsTypes (DocumentTypeCode, Name, Arabic_Name, MDT)
		SELECT DocumentTypeCode, Name, Arabic_Name, MDT FROM dbo.DocumentsTypes WITH (HOLDLOCK TABLOCKX)')

SET IDENTITY_INSERT dbo.Tmp_DocumentsTypes OFF

DROP TABLE dbo.DocumentsTypes

EXECUTE sp_rename N'dbo.Tmp_DocumentsTypes', N'DocumentsTypes', 'OBJECT' 

ALTER TABLE dbo.DocumentsTypes ADD CONSTRAINT
	PK_DocumentsTypes PRIMARY KEY CLUSTERED 
	(
	DocumentTypeCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


COMMIT


ALTER TABLE dbo.DocumentsTypes ADD
	CreatedBy int NOT NULL CONSTRAINT DF_DocumentsTypes_CreatedBy DEFAULT ((1)),
	CreationDate datetime NOT NULL CONSTRAINT DF_DocumentsTypes_CreationDate DEFAULT (getdate()),
	ModifiedBy int NULL,
	ModificationDate datetime NULL


Alter Table DocumentsTypes
Add  Serial nvarchar(150)  

Alter Table DocumentsTypes
Add  CentralCode int null   

Go
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1053,N'Documents Types',N'أنواع الوثائق المطلوبة',1023,N'/Personal/DocumentsTypes',N'Index','fa fa-thumb-tack',N'get',12,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1053,22)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4084,N'أنواع الوثائق المطلوبة',N'Documents Types',1053,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4085,N'عرض أنواع الوثائق المطلوبة',N'View Documents Types',1053,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4086,N'إضافة أنواع الوثائق المطلوبة',N'Add Documents Types',1053,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4087,N'تعديل أنواع الوثائق المطلوبة',N'Edit Documents Types',1053,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4088,N'حذف أنواع الوثائق المطلوبة',N'Delete Documents Types',1053,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4089,N'حفظ أنواع الوثائق المطلوبة',N'Save Documents Types',1053,2)
Go


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1567,N'Personal',N'DocumentsTypes',N'Index',0,N'get',4084)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1568,N'Personal',N'DocumentsTypes',N'DocumentsTypes_Read',0,N'post',4085)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1569,N'Personal',N'DocumentsTypes',N'Save',1,N'get',4086)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1570,N'Personal',N'DocumentsTypes',N'Save',2,N'get',4087)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1571,N'Personal',N'DocumentsTypes',N'Delete',0,N'post',4088)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1572,N'Personal',N'DocumentsTypes',N'Save',0,N'post',4089)


INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1042,NULL, NULL,N'DocumentsTypes',N'GetDocumentsTypesSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1043,NULL, NULL,N'DocumentsTypes',N'GetDocumentsTypes',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1044,NULL, NULL,N'DocumentsTypes',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1045,NULL, NULL,N'DocumentsTypes',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1046,NULL, NULL,N'DocumentsTypes',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1047,NULL, NULL,N'DocumentsTypes',N'Get',N'Get')
Go

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1320,1042,4085, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1321,1043,4085, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1322,1044,4089, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1323,1045,4089, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1324,1046,4088, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1325,1047,4087, NULL)
Go


update DocumentsTypes set Serial = DocumentTypeCode 
Go

----------------------------- End 2024-03-13 -------------------------------------------
----------------------------- Mostafa 2024-03-13 -------------------------------------------

BEGIN TRANSACTION

ALTER TABLE dbo.HealthInsuranceTypes
	DROP COLUMN RelativeAmount0, RelativeAmount1, RelativeAmount2, RelativeAmount3, RelativeAmount4, RelativeAmount5, RelativeAmount6, RelativeAmount7, RelativeAmount8, RelativeAmount9, RelativeAmount10, MDT, RelativeAmountOverage0, RelativeAmountOverage1, RelativeAmountOverage2, RelativeAmountOverage3, RelativeAmountOverage4, RelativeAmountOverage5, RelativeAmountOverage6, RelativeAmountOverage7, RelativeAmountOverage8, RelativeAmountOverage9, RelativeAmountOverage10

ALTER TABLE dbo.HealthInsuranceTypes SET (LOCK_ESCALATION = TABLE)

COMMIT

BEGIN TRANSACTION

CREATE TABLE dbo.Tmp_HealthInsuranceTypes
	(
	HealthInsuranceTypeCode int NOT NULL IDENTITY (1, 1),
	Name nvarchar(250) NULL,
	Arabic_Name nvarchar(250) NULL,
	Closed bit NULL,
	CreatedBy int NULL,
	CreationDate datetime NULL,
	ModifiedBy int NULL,
	ModificationDate datetime NULL
	)  ON [PRIMARY]

ALTER TABLE dbo.Tmp_HealthInsuranceTypes SET (LOCK_ESCALATION = TABLE)

SET IDENTITY_INSERT dbo.Tmp_HealthInsuranceTypes ON

IF EXISTS(SELECT * FROM dbo.HealthInsuranceTypes)
	 EXEC('INSERT INTO dbo.Tmp_HealthInsuranceTypes (HealthInsuranceTypeCode, Name, Arabic_Name, Closed)
		SELECT CONVERT(int, HealthInsuranceTypeCode), CONVERT(nvarchar(250), Name), CONVERT(nvarchar(250), Arabic_Name), Closed FROM dbo.HealthInsuranceTypes WITH (HOLDLOCK TABLOCKX)')

SET IDENTITY_INSERT dbo.Tmp_HealthInsuranceTypes OFF

DROP TABLE dbo.HealthInsuranceTypes

EXECUTE sp_rename N'dbo.Tmp_HealthInsuranceTypes', N'HealthInsuranceTypes', 'OBJECT' 

ALTER TABLE dbo.HealthInsuranceTypes ADD CONSTRAINT
	PK_HealthInsuranceTypes PRIMARY KEY CLUSTERED 
	(
	HealthInsuranceTypeCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


COMMIT

CREATE TABLE [dbo].[HealthInsuranceFamily](
	[HealthInsuranceFamilyCode] [int] IDENTITY(1,1) NOT NULL,
	[RelativeAmount] [float] NULL,
	[RelativeAmountOverage] [float] NULL,
	[HealthInsuranceTypeFamily] [int] NULL,
	[HealthInsuranceTypeCode] [int] NOT NULL,
 CONSTRAINT [PK_HealthInsuranceFamily] PRIMARY KEY CLUSTERED 
(
	[HealthInsuranceFamilyCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[HealthInsuranceFamily]  WITH CHECK ADD  CONSTRAINT [FK_HealthInsuranceFamily_HealthInsuranceTypes] FOREIGN KEY([HealthInsuranceTypeCode])
REFERENCES [dbo].[HealthInsuranceTypes] ([HealthInsuranceTypeCode])

ALTER TABLE [dbo].[HealthInsuranceFamily] CHECK CONSTRAINT [FK_HealthInsuranceFamily_HealthInsuranceTypes]
GO



INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1052,N'Health Insurance Type',N'انواع التامين الصحي',1023,N'/Personal/HealthInsuranceType',N'Index','fa fa-thumb-tack',N'get',11,1,1)
Go


INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1052,22)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4078,N'انواع التامين الصحي',N'Health Insurance Type',1052,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4079,N'عرض انواع التامين الصحي',N'View Health Insurance Type',1052,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4080,N'إضافة انواع التامين الصحي',N'Add Health Insurance Type',1052,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4081,N'تعديل انواع التامين الصحي',N'Edit Health InsuranceType',1052,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4082,N'حذف انواع التامين الصحي',N'Delete Health Insurance Type',1052,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4083,N'حفظ انواع التامين الصحي',N'Save Health Insurance Type',1052,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1555,N'Personal',N'HealthInsuranceType',N'Index',0,N'get',4078)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1556,N'Personal',N'HealthInsuranceType',N'HealthInsuranceType_Read',0,N'post',4079)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1557,N'Personal',N'HealthInsuranceType',N'Save',1,N'get',4080)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1558,N'Personal',N'HealthInsuranceType',N'Save',2,N'get',4081)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1559,N'Personal',N'HealthInsuranceType',N'Delete',0,N'post',4082)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1560,N'Personal',N'HealthInsuranceType',N'Save',0,N'post',4083)
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1030,NULL, NULL,N'HealthInsuranceType',N'GetHealthInsuranceTypeSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1031,NULL, NULL,N'HealthInsuranceType',N'GetHealthInsuranceType',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1032,NULL, NULL,N'HealthInsuranceType',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1033,NULL, NULL,N'HealthInsuranceType',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1034,NULL, NULL,N'HealthInsuranceType',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1035,NULL, NULL,N'HealthInsuranceType',N'Get',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1308,1030,4079, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1309,1031,4079, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1310,1032,4083, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1311,1033,4083, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1312,1034,4082, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1313,1035,4081, NULL)
Go


----------------------------- End 2024-03-13 -------------------------------------------

----------------------------- Mostafa 2024-03-13 -------------------------------------------
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1054,N'Health Insurance Type',N'انواع العلاقة بالتحقيق',1023,N'/Personal/InvestigationRelatedType',N'Index','fa fa-thumb-tack',N'get',11,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1054,22)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4090,N'انواع العلاقة بالتحقيق',N'Investigation Related Type',1054,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4091,N'عرض انواع العلاقة بالتحقيق',N'View Investigation Related Type',1054,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4092,N'إضافة انواع العلاقة بالتحقيق',N'Add Investigation Related Type',1054,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4093,N'تعديل انواع العلاقة بالتحقيق',N'Edit Investigation Related Type',1054,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4094,N'حذف انواع العلاقة بالتحقيق',N'Delete Investigation Related Type',1054,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4095,N'حفظ انواع العلاقة بالتحقيق',N'Save Investigation Related Type',1054,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1573,N'Personal',N'InvestigationRelatedType',N'Index',0,N'get',4090)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1574,N'Personal',N'InvestigationRelatedType',N'InvestigationRelatedType_Read',0,N'post',4091)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1575,N'Personal',N'InvestigationRelatedType',N'Save',1,N'get',4092)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1576,N'Personal',N'InvestigationRelatedType',N'Save',2,N'get',4093)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1577,N'Personal',N'InvestigationRelatedType',N'Delete',0,N'post',4094)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1578,N'Personal',N'InvestigationRelatedType',N'Save',0,N'post',4095)
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1048,NULL, NULL,N'InvestigationRelatedType',N'GetInvestigationRelatedTypeSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1049,NULL, NULL,N'InvestigationRelatedType',N'GetInvestigationRelatedType',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1050,NULL, NULL,N'InvestigationRelatedType',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1051,NULL, NULL,N'InvestigationRelatedType',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1052,NULL, NULL,N'InvestigationRelatedType',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1053,NULL, NULL,N'InvestigationRelatedType',N'Get',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1326,1048,4091, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1327,1049,4091, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1328,1050,4095, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1329,1051,4095, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1330,1052,4094, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1331,1053,4093, NULL)
Go

----------------------------- End 2024-03-13 -------------------------------------------
----------------------------- Mostafa 2024-03-13 -------------------------------------------


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1026,N'Health ID Type',N'انواع البطاقة الصحية',1023,N'/Personal/HealthIDType',N'Index','fa fa-thumb-tack',N'get',11,1,1)
Go


INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1026,22)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4066,N'انواع البطاقة الصحية',N'Health ID Type',1026,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4067,N'عرض انواع البطاقة الصحية',N'View Health ID Type',1026,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4068,N'إضافة انواع البطاقة الصحية',N'Add Health ID Type',1026,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4069,N'تعديل انواع البطاقة الصحية',N'Edit Health ID Type',1026,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4070,N'حذف انواع البطاقة الصحية',N'Delete Health ID Type',1026,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4071,N'حفظ انواع البطاقة الصحية',N'Save Health ID Type',1026,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1549,N'Personal',N'HealthIDType',N'Index',0,N'get',4066)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1550,N'Personal',N'HealthIDType',N'HealthIDType_Read',0,N'post',4067)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1551,N'Personal',N'HealthIDType',N'Save',1,N'get',4068)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1552,N'Personal',N'HealthIDType',N'Save',2,N'get',4069)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1553,N'Personal',N'HealthIDType',N'Delete',0,N'post',4070)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1554,N'Personal',N'HealthIDType',N'Save',0,N'post',4071)
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1024,NULL, NULL,N'HealthIDType',N'GetHealthIDTypeSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1025,NULL, NULL,N'HealthIDType',N'GetHealthIDType',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1026,NULL, NULL,N'HealthIDType',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1027,NULL, NULL,N'HealthIDType',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1028,NULL, NULL,N'HealthIDType',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1029,NULL, NULL,N'HealthIDType',N'Get',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1302,1024,4067, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1303,1025,4067, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1304,1026,4071, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1305,1027,4071, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1306,1028,4070, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1307,1029,4069, NULL)
Go
----------------------------- End 2024-03-13 -------------------------------------------
----------------------------- Mostafa 2024-03-13 -------------------------------------------

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1055,N' Keeping Type',N'انواع العهد',1023,N'/Personal/KeepingType',N'Index','fa fa-thumb-tack',N'get',12,1,1)
Go


INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1055,22)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4096,N'انواع العهد',N' Keeping Type',1055,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4097,N'عرض انواع العهد',N'View  Keeping Type',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4098,N'إضافة انواع العهد',N'Add  Keeping Type',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4099,N'تعديل انواع العهد',N'Edit  Keeping Type',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4100,N'حذف انواع العهد',N'Delete  Keeping Type',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4101,N'حفظ انواع العهد',N'Save  Keeping Type',1055,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1579,N'Personal',N'KeepingType',N'Index',0,N'get',4096)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1580,N'Personal',N'KeepingType',N'KeepingType_Read',0,N'post',4097)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1581,N'Personal',N'KeepingType',N'Save',1,N'get',4098)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1582,N'Personal',N'KeepingType',N'Save',2,N'get',4099)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1583,N'Personal',N'KeepingType',N'Delete',0,N'post',4100)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1584,N'Personal',N'KeepingType',N'Save',0,N'post',4101)
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1054,NULL, NULL,N'KeepingType',N'GetKeepingTypeSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1055,NULL, NULL,N'KeepingType',N'GetKeepingType',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1056,NULL, NULL,N'KeepingType',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1057,NULL, NULL,N'KeepingType',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1058,NULL, NULL,N'KeepingType',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1059,NULL, NULL,N'KeepingType',N'Get',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1332,1054,4097, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1333,1055,4097, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1334,1056,4101, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1335,1057,4101, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1336,1058,4100, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1337,1059,4099, NULL)
Go
----------------------------- End 2024-03-13 -------------------------------------------
----------------------------- Mostafa 2024-03-14 -------------------------------------------

BEGIN TRANSACTION

ALTER TABLE dbo.PromotionReasons
	DROP CONSTRAINT DF_PromotionReasons_PromotionReasonCode

ALTER TABLE dbo.PromotionReasons
	DROP CONSTRAINT DF_PromotionReasons_SocialIncrease
	

CREATE TABLE dbo.Tmp_PromotionReasons
	(
	PromotionReasonCode tinyint NOT NULL IDENTITY (0, 1),
	Name nvarchar(250) NULL,
	Arabic_Name nvarchar(250) NULL,
	SocialIncrease bit NULL,
	IsPromotionReasons bit NOT NULL

	)  ON [PRIMARY]

ALTER TABLE dbo.Tmp_PromotionReasons SET (LOCK_ESCALATION = TABLE)

ALTER TABLE dbo.Tmp_PromotionReasons ADD CONSTRAINT
	DF_PromotionReasons_SocialIncrease DEFAULT ((0)) FOR SocialIncrease

ALTER TABLE dbo.Tmp_PromotionReasons ADD CONSTRAINT
	DF__Promotion__IsPro__013F142A DEFAULT ((0)) FOR IsPromotionReasons

SET IDENTITY_INSERT dbo.Tmp_PromotionReasons ON

IF EXISTS(SELECT * FROM dbo.PromotionReasons)
	 EXEC('INSERT INTO dbo.Tmp_PromotionReasons (PromotionReasonCode, Name, Arabic_Name, SocialIncrease, IsPromotionReasons)
		SELECT PromotionReasonCode, Name, Arabic_Name, SocialIncrease, IsPromotionReasons FROM dbo.PromotionReasons WITH (HOLDLOCK TABLOCKX)')

SET IDENTITY_INSERT dbo.Tmp_PromotionReasons OFF

ALTER TABLE dbo.WF_PromotionRequest
	DROP CONSTRAINT FK_WF_PromotionRequest_PromotionReasons

DROP TABLE dbo.PromotionReasons

EXECUTE sp_rename N'dbo.Tmp_PromotionReasons', N'PromotionReasons', 'OBJECT' 

ALTER TABLE dbo.PromotionReasons ADD CONSTRAINT
	PK_PromotionReasons PRIMARY KEY CLUSTERED 
	(
	PromotionReasonCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.WF_PromotionRequest ADD CONSTRAINT
	FK_WF_PromotionRequest_PromotionReasons FOREIGN KEY
	(
	PromotionReasonCode
	) REFERENCES dbo.PromotionReasons
	(
	PromotionReasonCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	

ALTER TABLE dbo.WF_PromotionRequest SET (LOCK_ESCALATION = TABLE)

COMMIT
GO


ALTER TABLE dbo.PromotionReasons ADD
	CreatedBy int NULL,
	CreationDate datetime NULL,
	ModifiedBy int NULL,
	ModificationDate datetime NULL
GO

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1055,N'Promotion Reason',N'اسباب الترقية',1023,N'/Personal/PromotionReason',N'Index','fa fa-thumb-tack',N'get',12,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1055,22)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4096,N'اسباب الترقية',N'Promotion Reason',1055,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4097,N'عرض اسباب الترقية',N'View Promotion Reason',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4098,N'إضافة اسباب الترقية',N'Add Promotion Reason',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4099,N'تعديل اسباب الترقية',N'Edit Promotion Reason',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4100,N'حذف اسباب الترقية',N'Delete Promotion Reason',1055,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4101,N'حفظ اسباب الترقية',N'Save Promotion Reason',1055,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1579,N'Personal',N'PromotionReason',N'Index',0,N'get',4096)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1580,N'Personal',N'PromotionReason',N'PromotionReason_Read',0,N'post',4097)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1581,N'Personal',N'PromotionReason',N'Save',1,N'get',4098)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1582,N'Personal',N'PromotionReason',N'Save',2,N'get',4099)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1583,N'Personal',N'PromotionReason',N'Delete',0,N'post',4100)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1584,N'Personal',N'PromotionReason',N'Save',0,N'post',4101)
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1054,NULL, NULL,N'PromotionReason',N'GetPromotionReasonSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1055,NULL, NULL,N'PromotionReason',N'GetPromotionReason',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1056,NULL, NULL,N'PromotionReason',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1057,NULL, NULL,N'PromotionReason',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1058,NULL, NULL,N'PromotionReason',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1059,NULL, NULL,N'PromotionReason',N'Get',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1332,1054,4097, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1333,1055,4097, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1334,1056,4101, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1335,1057,4101, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1336,1058,4100, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1337,1059,4099, NULL)
Go

----------------------------- End 2024-03-13 -------------------------------------------

----------------------------------M.negm 2024-03-14 -------------------------------------



/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Military
	DROP CONSTRAINT DF_Military_MilitaryCode

CREATE TABLE dbo.Tmp_Military
	(
	MilitaryCode tinyint NOT NULL IDENTITY (0, 1),
	Name nvarchar(100) NULL,
	Arabic_Name nvarchar(100) NULL
	)  ON [PRIMARY]

ALTER TABLE dbo.Tmp_Military SET (LOCK_ESCALATION = TABLE)

SET IDENTITY_INSERT dbo.Tmp_Military ON

IF EXISTS(SELECT * FROM dbo.Military)
	 EXEC('INSERT INTO dbo.Tmp_Military (MilitaryCode, Name, Arabic_Name)
		SELECT MilitaryCode, Name, Arabic_Name FROM dbo.Military WITH (HOLDLOCK TABLOCKX)')

SET IDENTITY_INSERT dbo.Tmp_Military OFF

ALTER TABLE dbo.Rec_RecruitEmployee
	DROP CONSTRAINT FK_Rec_RecruitEmployee_Military

DROP TABLE dbo.Military

EXECUTE sp_rename N'dbo.Tmp_Military', N'Military', 'OBJECT' 

ALTER TABLE dbo.Military ADD CONSTRAINT
	PK_Military PRIMARY KEY CLUSTERED 
	(
	MilitaryCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Rec_RecruitEmployee ADD CONSTRAINT
	FK_Rec_RecruitEmployee_Military FOREIGN KEY
	(
	MilitaryCode
	) REFERENCES dbo.Military
	(
	MilitaryCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	

ALTER TABLE dbo.Rec_RecruitEmployee SET (LOCK_ESCALATION = TABLE)

COMMIT




ALTER TABLE dbo.Military ADD
	CreatedBy int NOT NULL CONSTRAINT DF_Military_CreatedBy DEFAULT ((1)),
	CreationDate datetime NOT NULL CONSTRAINT DF_Military_CreationDate DEFAULT (getdate()),
	ModifiedBy int NULL,
	ModificationDate datetime NULL
GO


Alter Table Military
Add  Serial nvarchar(150)  ;





INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1056,N'Military',N'الخدمة العسكرية',1023,N'/Personal/Military',N'Index','fa fa-thumb-tack',N'get',13,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1056,22)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4102,N'الخدمة العسكرية',N'Military',1056,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4103,N'عرض الخدمة العسكرية',N'View Military',1056,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4104,N'إضافة الخدمة العسكرية',N'Add Military',1056,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4105,N'تعديل الخدمة العسكرية',N'Edit Military',1056,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4106,N'حذف الخدمة العسكرية',N'Delete Military',1056,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4107,N'حفظ الخدمة العسكرية',N'Save Military',1056,2)
Go

-- SSTAuthorizationActionFilterBefore (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1585,N'Personal',N'Military',N'Index',0,N'get',4102)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1586,N'Personal',N'Military',N'Military_Read',0,N'post',4103)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1587,N'Personal',N'Military',N'Save',1,N'get',4104)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1588,N'Personal',N'Military',N'Save',2,N'get',4105)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1589,N'Personal',N'Military',N'Delete',0,N'post',4106)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1590,N'Personal',N'Military',N'Save',0,N'post',4107)

-- Api security privilege End Point (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1060,NULL, NULL,N'Military',N'GetMilitarySearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1061,NULL, NULL,N'Military',N'GetMilitary',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1062,NULL, NULL,N'Military',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1063,NULL, NULL,N'Military',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1064,NULL, NULL,N'Military',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1065,NULL, NULL,N'Military',N'Get',N'Get')
Go
-- Api security privilege End Point Detail (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1338,1060,4103, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1339,1061,4103, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1340,1062,4107, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1341,1063,4107, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1342,1064,4106, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1343,1065,4105, NULL)
Go

------------------------------------- End 2024-03-14 ------------------------------------
------------------------------------M.negm 2024-03 -14 -------------------------------


/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Nationality
	DROP CONSTRAINT FK_Nationality_MappingNationality

ALTER TABLE dbo.MappingResources SET (LOCK_ESCALATION = TABLE)

COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Nationality
	DROP CONSTRAINT DF_Nationality_NationalityCode

CREATE TABLE dbo.Tmp_Nationality
	(
	NationalityCode tinyint NOT NULL IDENTITY (0, 1),
	Name nvarchar(30) NULL,
	Arabic_Name nvarchar(30) NULL,
	CountryName nvarchar(150) NULL,
	CountryArabic_Name nvarchar(150) NULL,
	NationalityType int NULL,
	MappingCode int NULL
	)  ON [PRIMARY]

ALTER TABLE dbo.Tmp_Nationality SET (LOCK_ESCALATION = TABLE)

SET IDENTITY_INSERT dbo.Tmp_Nationality ON

IF EXISTS(SELECT * FROM dbo.Nationality)
	 EXEC('INSERT INTO dbo.Tmp_Nationality (NationalityCode, Name, Arabic_Name, CountryName, CountryArabic_Name, NationalityType, MappingCode)
		SELECT NationalityCode, Name, Arabic_Name, CountryName, CountryArabic_Name, NationalityType, MappingCode FROM dbo.Nationality WITH (HOLDLOCK TABLOCKX)')

SET IDENTITY_INSERT dbo.Tmp_Nationality OFF

ALTER TABLE dbo.Rec_RecruitEmployee
	DROP CONSTRAINT FK_Rec_RecruitEmployee_Nationality

ALTER TABLE dbo.Rec_RecruitJobNationalities
	DROP CONSTRAINT FK_Rec_RecruitJobNationalities_Nationality

DROP TABLE dbo.Nationality

EXECUTE sp_rename N'dbo.Tmp_Nationality', N'Nationality', 'OBJECT' 

ALTER TABLE dbo.Nationality ADD CONSTRAINT
	PK_Nationality PRIMARY KEY CLUSTERED 
	(
	NationalityCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


ALTER TABLE dbo.Nationality ADD CONSTRAINT
	FK_Nationality_MappingNationality FOREIGN KEY
	(
	MappingCode
	) REFERENCES dbo.MappingResources
	(
	MappingResourceCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	

COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Rec_RecruitJobNationalities ADD CONSTRAINT
	FK_Rec_RecruitJobNationalities_Nationality FOREIGN KEY
	(
	NationalityCode
	) REFERENCES dbo.Nationality
	(
	NationalityCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	

ALTER TABLE dbo.Rec_RecruitJobNationalities SET (LOCK_ESCALATION = TABLE)

COMMIT
BEGIN TRANSACTION

ALTER TABLE dbo.Rec_RecruitEmployee ADD CONSTRAINT
	FK_Rec_RecruitEmployee_Nationality FOREIGN KEY
	(
	NationalityCode
	) REFERENCES dbo.Nationality
	(
	NationalityCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	

ALTER TABLE dbo.Rec_RecruitEmployee SET (LOCK_ESCALATION = TABLE)

COMMIT

ALTER TABLE dbo.Nationality ADD
	CreatedBy int NOT NULL CONSTRAINT DF_Nationality_CreatedBy DEFAULT ((1)),
	CreationDate datetime NOT NULL CONSTRAINT DF_Nationality_CreationDate DEFAULT (getdate()),
	ModifiedBy int NULL,
	ModificationDate datetime NULL


Alter Table Nationality
Add  Serial nvarchar(150)  ;

Go
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1057,N'Nationality',N'الجنسية',1023,N'/Personal/Nationality',N'Index','fa fa-thumb-tack',N'get',14,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1057,22)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4108,N'الجنسية',N'Nationality',1057,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4109,N'عرض الجنسية',N'View Nationality',1057,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4110,N'إضافة الجنسية',N'Add Nationality',1057,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4111,N'تعديل الجنسية',N'Edit Nationality',1057,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4112,N'حذف الجنسية',N'Delete Nationality',1057,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4113,N'حفظ الجنسية',N'Save Nationality',1057,2)
Go

-- SSTAuthorizationActionFilterBefore (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1591,N'Personal',N'Nationality',N'Index',0,N'get',4108)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1592,N'Personal',N'Nationality',N'Nationality_Read',0,N'post',4109)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1593,N'Personal',N'Nationality',N'Save',1,N'get',4110)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1594,N'Personal',N'Nationality',N'Save',2,N'get',4111)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1595,N'Personal',N'Nationality',N'Delete',0,N'post',4112)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1596,N'Personal',N'Nationality',N'Save',0,N'post',4113)

-- Api security privilege End Point (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1066,NULL, NULL,N'Nationality',N'GetNationalitySearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1067,NULL, NULL,N'Nationality',N'GetNationality',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1068,NULL, NULL,N'Nationality',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1069,NULL, NULL,N'Nationality',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1070,NULL, NULL,N'Nationality',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1071,NULL, NULL,N'Nationality',N'Get',N'Get')
Go
-- Api security privilege End Point Detail (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1344,1066,4109, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1345,1067,4109, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1346,1068,4113, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1347,1069,4113, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1348,1070,4112, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1349,1071,4111, NULL)
Go

update nationality set serial = nationalitycode

------------------------------------End 2024-03-14 --------------------------------------------
------------------------------------MOstafa 2024-03-14 --------------------------------------------
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1058,N'Restaurant',N'المطعم',1023,N'/Personal/Restaurant',N'Index','fa fa-thumb-tack',N'get',12,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1058,22)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4114,N'المطعم',N'Restaurant',1058,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4115,N'عرض المطعم',N'View Restaurant',1058,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4116,N'إضافة المطعم',N'Add Restaurant',1058,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4117,N'تعديل المطعم',N'Edit Restaurant',1058,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4118,N'حذف المطعم',N'Delete Restaurant',1058,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4119,N'حفظ المطعم',N'Save Restaurant',1058,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1612,N'Personal',N'Restaurant',N'Index',0,N'get',4114)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1613,N'Personal',N'Restaurant',N'Restaurant_Read',0,N'post',4115)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1614,N'Personal',N'Restaurant',N'Save',1,N'get',4116)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1615,N'Personal',N'Restaurant',N'Save',2,N'get',4117)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1616,N'Personal',N'Restaurant',N'Delete',0,N'post',4118)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1617,N'Personal',N'Restaurant',N'Save',0,N'post',4119)
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1072,NULL, NULL,N'Restaurant',N'GetRestaurantSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1073,NULL, NULL,N'Restaurant',N'GetRestaurant',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1074,NULL, NULL,N'Restaurant',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1075,NULL, NULL,N'Restaurant',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1076,NULL, NULL,N'Restaurant',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1077,NULL, NULL,N'Restaurant',N'Get',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1350,1072,4115, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1351,1073,4115, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1352,1074,4119, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1353,1075,4119, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1354,1076,4118, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1355,1077,4117, NULL)
Go

------------------------------------End 2024-03-14 --------------------------------------------
