﻿-------------------------Mostafa 2023-09-05------------------------------

  ALTER TABLE dbo.NotificationTemplate ADD
NotificationBody nvarchar(MAX)  NULL,
NotificationBody_Arabic nvarchar(MAX)  NULL
GO
ALTER TABLE dbo.NotificationTemplateType ADD
IsSendWhatsAppNotifications bit NOT NULL  DEFAULT ((0)),
IsSendRealTimeMobileNotifications bit NOT NULL  DEFAULT ((0)),
IsSendEmailNotifications bit NOT NULL  DEFAULT ((0))
GO
update NotificationTemplateType set IsSendEmailNotifications=1
GO
ALTER TABLE dbo.NotificationFlag ADD
SendByEmail bit NOT NULL  DEFAULT ((0)),
SendByWhatsApp bit NOT NULL  DEFAULT ((0)),
SendByFirebaseNotif bit NOT NULL  DEFAULT ((0))
GO
update NotificationFlag set SendByEmail=1
GO
CREATE TABLE [dbo].[NotificationServiceLog](
	[NotificationServiceLogCode] [int] IDENTITY(1,1) NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[SendBy] [tinyint] NOT NULL,
	[Message] [nvarchar](max) NOT NULL,
	[CreationDate] [datetime] NOT NULL,
 CONSTRAINT [PK_NotificationServiceLog] PRIMARY KEY CLUSTERED 
(
	[NotificationServiceLogCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


-------------------------End 2023-09-05------------------------------
-------------------------Hammad 2023-09-05---------------------------
update ConfigCategory set Name=N'Notifications Services', Arabic_Name=N'اشعارات البريد الالكترونى' where ConfigCategoryCode=21
Go
INSERT [dbo].[ConfigParameter] ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId], [ConfigDescription])
VALUES (N'SendPermmissionExceedByDay', N'Send Permission Exceed By Day', N'إرسال إشعار الحد الاقصى للاذن فى اليوم  ', N'false', 21, 6, 1, 1, NULL, NULL, NULL, N'إرسال إشعار الحد الاقصى للاذن فى اليوم  ')
GO
-------------------------End 2023-09-05---------------------------
-------------------------Hammad 2023-09-06---------------------------

INSERT [dbo].[ConfigParameter] ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId], [ConfigDescription])
VALUES (N'VacIgnorePlacementVacationBalance', N'Ignore placement in vacation balance', N'إلغاء التنسيب فى رصيد الاجازات  ', N'false', 2, 4, 1, 1, NULL, NULL, 11, N' إلغاء التنسيب فى رصيد الاجازات ')
GO
-------------------------End 2023-09-06---------------------------