CREATE TABLE `tbldashboard_banners` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`code_name` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
	`images` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
	`link` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
	`for_plans` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
	`from_date` DATETIME NULL DEFAULT NULL,
	`to_date` DATETIME NULL DEFAULT NULL,
	`is_closable` TINYINT(4) NULL DEFAULT NULL,
	`priority` TINYINT(4) NULL DEFAULT '1',
	`disclaimer` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
	`created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
	`updated_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	PRIMARY KEY (`id`) USING BTREE,
	UNIQUE INDEX `code_name` (`code_name`) USING BTREE,
	INDEX `index_code_name` (`code_name`) USING BTREE,
	INDEX `index_from_date` (`from_date`) USING BTREE,
	INDEX `index_to_date` (`to_date`) USING BTREE,
	INDEX `index_priority` (`priority`) USING BTREE
);


CREATE TABLE `tbldashboard_banner_images` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`banner_id` INT(11) NOT NULL,
	`image` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
	`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
	`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	INDEX `Banner_image_index` (`id`) USING BTREE,
	INDEX `Banner_id_foreign_key` (`banner_id`) USING BTREE,
	CONSTRAINT `Banner_id_foreign_key` FOREIGN KEY (`banner_id`) REFERENCES `tbldashboard_banners` (`id`) ON UPDATE NO ACTION ON DELETE NO ACTION
);
 --Dashboard Banner File Configuration ---
 INSERT INTO `tblapad_options` (`id`, `type`, `name`, `value`, `form_input_type`, `autoload`) VALUES ('', 'dashboard_banners', 'allowed_file_extention', '{"image":["jpeg","jpg","png","gif","webp"],"video":[],"audio":[],"document":[]}', 'text', 1);
INSERT INTO `tblapad_options` (`id`, `type`, `name`, `value`, `form_input_type`, `autoload`) VALUES ('', 'dashboard_banners', 'allowed_file_size', '16000', 'text', 1);
INSERT INTO `tblapad_options` (`id`, `type`, `name`, `value`, `form_input_type`, `autoload`) VALUES ('', 'dashboard_banners', 'total_file_count', '10', 'text', 1);
INSERT INTO `tblapad_options` (`id`, `type`, `name`, `value`, `form_input_type`, `autoload`) VALUES ('', 'dashboard_banners', 'allowed_file_count', '10', 'text', 0);
--Dashboard Banner File Configuration ---

-- Staff New Designation Field Add ----
ALTER TABLE `tblstaff` ADD `designation` VARCHAR(200) NOT NULL DEFAULT 'Team Member' AFTER `is_dashboard_collapsed`;
-- Staff New Designation Field Add ----