UPDATE `sps_membership_log` SET is_notify = 3 WHERE is_notify IN (1, 2) ;
UPDATE `sps_membership_bal_noti` SET is_notify = 0 WHERE is_notify  = 1;


CREATE TABLE `sps_sms_templates` (
  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `sms_title` VARCHAR(255) NOT NULL,
  `slug` VARCHAR(255) NOT NULL,
  `registration_no` VARCHAR(255) NOT NULL,
  `content` TEXT NOT NULL,
  `status` TINYINT(4) NOT NULL DEFAULT '1',
  `created_by` BIGINT(20) NOT NULL,
  `updated_by` BIGINT(20) DEFAULT NULL,
  `created_at` TIMESTAMP NULL DEFAULT NULL,
  `updated_at` TIMESTAMP NULL DEFAULT NULL,
  `deleted_at` TIMESTAMP NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('1','New Membership','new_membership','1007326594339402301','Dear ##CUSTOMER_NAME##, Welcome to Secure Parking’s membership program ##PRODUCT_NAME##. Please note that your membership ID is ##MEMBERSHIP_ID## and is valid up to ##EXPIRY_DATE##. We look forward to give you a smooth experience every day','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('2','Membership Extension','membership_extension','1007526508441547354','Dear ##CUSTOMER_NAME##, thank you for extending your membership with Secure parking. Please note that membership will be due for renewal by ##EXPIRY_DATE##','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('3','Membership Value','membership_value','1007628874919189661','Dear ##CUSTOMER_NAME##, Thank you for making transaction with Secure Parking. The available balance on your card is ##VALUE## ##STRING##.','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('4','Tariff Change','tariff_change','1007011851653305657','Dear ##RECIPIENT_NAME##, \r\n\r\nPlease be alerted that Tariff for the ##SCREEN_NAME## has changed ##TARIFF_CODE## on ##CURRENT_DATE##.\r\n\r\nBest Regards,\r\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('5','EOD Report Failure Alert','eod_report_failure_alert','1007680072521076333','Dear ##RECIPIENT_NAME##, please be alerted that at site ##SITE_NAME##, EOD report for the date ##CURRENT_DATE## has failed to generate. We will take necessary actions to resolve it ASAP.','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('6','EOD Report Success Alert','eod_report_success_alert_v0','1007114938996581165','Dear ##RECIPIENT_NAME##, please note that at site ##SITE_NAME##, EOD Report for the date ##CURRENT_DATE## has been successfully generated. Details are:\nTotal Vehicle count = ##TOTAL_VEHICLE_COUNT## and Total Vehicle Revenue = ##TOTAL_VEHICLE_REVENUE##\n\nBest Regards,\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('7','EOD Report Success Alert','eod_report_success_alert_v1','1007546447169595567','Dear ##RECIPIENT_NAME##, please note that at site ##SITE_NAME##, EOD Report for the date ##CURRENT_DATE## has been successfully generated. Details are:\n##VEHICLE_TYPE1_COUNT_STR## =##VEHICLE_TYPE1_COUNT## and ##VEHICLE_TYPE1_REVENUE_STR## = ##VEHICLE_TYPE1_REVENUE##\nTotal Vehicle count = ##TOTAL_VEHICLE_COUNT## and Total Vehicle Revenue = ##TOTAL_VEHICLE_REVENUE##\n\n\nBest Regards,\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('8','EOD Report Success Alert','eod_report_success_alert_v2','1007396046486431806','Dear ##RECIPIENT_NAME##, please note that at site ##SITE_NAME##, EOD Report for the date ##CURRENT_DATE## has been successfully generated. Details are:\n##VEHICLE_TYPE1_COUNT_STR## = ##VEHICLE_TYPE1_COUNT## and ##VEHICLE_TYPE1_REVENUE_STR## = ##VEHICLE_TYPE1_REVENUE##\n##VEHICLE_TYPE2_COUNT_STR## = ##VEHICLE_TYPE2_COUNT## and ##VEHICLE_TYPE2_REVENUE_STR## = ##VEHICLE_TYPE2_REVENUE## \nTotal Vehicle count = ##TOTAL_VEHICLE_COUNT## and Total Vehicle Revenue = ##TOTAL_VEHICLE_REVENUE##\n\nBest regards,\n\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('9','EOD Report Success Alert','eod_report_success_alert_v3','1007264598612285363','Dear ##RECIPIENT_NAME##, please note that at site ##SITE_NAME##, EOD Report for the date ##CURRENT_DATE## has been successfully generated. Details are:\n##VEHICLE_TYPE1_COUNT_STR## = ##VEHICLE_TYPE1_COUNT## and ##VEHICLE_TYPE1_REVENUE_STR## = ##VEHICLE_TYPE1_REVENUE##\n##VEHICLE_TYPE2_COUNT_STR## = ##VEHICLE_TYPE2_COUNT## and ##VEHICLE_TYPE2_REVENUE_STR## = ##VEHICLE_TYPE2_REVENUE## \n##VEHICLE_TYPE3_COUNT_STR## = ##VEHICLE_TYPE3_COUNT## and ##VEHICLE_TYPE3_REVENUE_STR## = ##VEHICLE_TYPE3_REVENUE## \nTotal Vehicle count = ##TOTAL_VEHICLE_COUNT## and Total Vehicle Revenue = ##TOTAL_VEHICLE_REVENUE##\n\nBest Regards,\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('10','EOD Report Success Alert','eod_report_success_alert_v4','1007454508285210701','Dear ##RECIPIENT_NAME## please note that at site ##SITE_NAME##, EOD Report for the date ##CURRENT_DATE## has been successfully generated. Details are:\n##VEHICLE_TYPE1_COUNT_STR## = ##VEHICLE_TYPE1_COUNT## and ##VEHICLE_TYPE1_REVENUE_STR## = ##VEHICLE_TYPE1_REVENUE##\n##VEHICLE_TYPE2_COUNT_STR## = ##VEHICLE_TYPE2_COUNT## and ##VEHICLE_TYPE2_REVENUE_STR## = ##VEHICLE_TYPE2_REVENUE## \n##VEHICLE_TYPE3_COUNT_STR## = ##VEHICLE_TYPE3_COUNT## and ##VEHICLE_TYPE3_REVENUE_STR## = ##VEHICLE_TYPE3_REVENUE##\n##VEHICLE_TYPE4_COUNT_STR## = ##VEHICLE_TYPE4_COUNT## and ##VEHICLE_TYPE4_REVENUE_STR## = ##VEHICLE_TYPE4_REVENUE## \nTotal Vehicle count = ##TOTAL_VEHICLE_COUNT## and Total Vehicle Revenue = ##TOTAL_VEHICLE_REVENUE##\n\nBest Regards,\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('11','EOD Report Success Alert','eod_report_success_alert_v5','1007313650493496191','Dear ##RECIPIENT_NAME##, please note that at site ##SITE_NAME##, EOD Report for the date ##CURRENT_DATE## has been successfully generated. Details are:\n##VEHICLE_TYPE1_COUNT_STR## = ##VEHICLE_TYPE1_COUNT## and ##VEHICLE_TYPE1_REVENUE_STR## = ##VEHICLE_TYPE1_REVENUE##\n##VEHICLE_TYPE2_COUNT_STR## = ##VEHICLE_TYPE2_COUNT## and ##VEHICLE_TYPE2_REVENUE_STR## = ##VEHICLE_TYPE2_REVENUE## \n##VEHICLE_TYPE3_COUNT_STR## = ##VEHICLE_TYPE3_COUNT## and ##VEHICLE_TYPE3_REVENUE_STR## = ##VEHICLE_TYPE3_REVENUE##\n#VEHICLE_TYPE4_COUNT_STR## = ##VEHICLE_TYPE4_COUNT## and ##VEHICLE_TYPE4_REVENUE_STR## = ##VEHICLE_TYPE4_REVENUE##\n##VEHICLE_TYPE5_COUNT_STR## = ##VEHICLE_TYPE5_COUNT## and ##VEHICLE_TYPE5_REVENUE_STR## = ##VEHICLE_TYPE5_REVENUE## \nTotal Vehicle count = ##TOTAL_VEHICLE_COUNT## and Total Vehicle Revenue = ##TOTAL_VEHICLE_REVENUE##\n\nBest Regards,\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);

INSERT INTO `sps_sms_templates` (`id`, `sms_title`, `slug`, `registration_no`, `content`, `status`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES('12','Monitoring alert','monitoring_alert','1007655427118195348','Dear ##RECIPIENT_NAME##, please be alerted that at site ##SITE_NAME##, equipment ##EQUIPMENT## is down at gate ##GATE##. We shall attend the issue asap\n\nRegards,\nSecure Parking Solutions','1','1',NULL,'2021-05-06 11:21:55',NULL,NULL);