DROP TABLE `tbl_admin`;

CREATE TABLE `tbl_admin` (
  `id` int(11) NOT NULL,
  `username` varchar(100) NOT NULL,
  `password` text NOT NULL,
  `email` varchar(200) NOT NULL,
  `image` varchar(255) NOT NULL,
  `status` int(1) NOT NULL DEFAULT 1,
  `admin_type` int(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

INSERT INTO `tbl_admin` (`id`, `username`, `password`, `email`, `image`, `status`, `admin_type`) VALUES
(1, 'admin', '$2y$10$4u.KkNlzwtRfkpPTKliHReupX1JhZ5tnSSwgfZphmkRnFEBk5fKuK', 'info.nemosoftso@gmail.com', '', 1, 3);

ALTER TABLE `tbl_admin`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `tbl_admin`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;



CREATE TABLE `tbl_users_trial` (
  `id` int(10) NOT NULL,
  `user_type` varchar(20) NOT NULL DEFAULT 'xui',
  `user_name` text NOT NULL,
  `user_password` text NOT NULL,
  `dns_base` text NOT NULL,
  `exp_date` varchar(200) NOT NULL DEFAULT '0',
  `registered_on` varchar(200) NOT NULL DEFAULT '0',
  `status` int(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

ALTER TABLE `tbl_users_trial`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `tbl_users_trial`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

ALTER TABLE `tbl_web_settings` 
ADD `is_select_xui` varchar(255) NOT NULL DEFAULT 'true',
ADD `is_select_stream` varchar(255) NOT NULL DEFAULT 'true',
ADD `is_select_device_id` varchar(255) NOT NULL DEFAULT 'true',
ADD `is_select_activation_code` varchar(255) NOT NULL DEFAULT 'true',
ADD `is_select_single` varchar(255) NOT NULL DEFAULT 'true',
ADD `is_maintenance` varchar(255) NOT NULL DEFAULT 'false',
ADD `is_xui_dns` varchar(255) NOT NULL DEFAULT 'true',
ADD `is_stream_dns` varchar(255) NOT NULL DEFAULT 'true';

ALTER TABLE `tbl_settings` 
ADD `is_trial_xui` varchar(255) NOT NULL DEFAULT 'true',
ADD `login_access_code` varchar(255) NOT NULL,
ADD `admin_access_code` varchar(255) NOT NULL,
ADD `admin_api_key` varchar(255) NOT NULL,
ADD `admin_packages` varchar(255) NOT NULL,
ADD `reseller_access_code` varchar(255) NOT NULL,
ADD `reseller_api_key` varchar(255) NOT NULL,
ADD `admin_trial_note` text NOT NULL;