-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `serenity_premium`
--

-- --------------------------------------------------------

--
-- Table structure for table `account_extension`
--

CREATE TABLE `account_extension` (
  `id_account` varchar(36) NOT NULL,
  `name_account` varchar(100) NOT NULL,
  `icon_url` text DEFAULT NULL,
  `redirect_url` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `account_extension`
--

INSERT INTO `account_extension` (`id_account`, `name_account`, `icon_url`, `redirect_url`, `created_at`, `updated_at`) VALUES
('bb11e686-ff4b-11ef-a027-42010ab80003', 'Netflix', 'https://www.netflix.com/favicon.ico', 'https://www.netflix.com/', '2025-03-12 14:10:19', '2025-03-12 14:10:19'),
('f4c74c9d-fd6a-11ef-a027-42010ab80003', 'ChatGPT Plus', 'https://chatgpt.com/favicon.ico', 'https://chatgpt.com/', '2025-03-10 04:48:48', '2025-03-10 04:48:48');

-- --------------------------------------------------------

--
-- Table structure for table `account_number`
--

CREATE TABLE `account_number` (
  `id_number` varchar(36) NOT NULL,
  `id_account` varchar(36) NOT NULL,
  `number_account` varchar(100) NOT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `account_number`
--

INSERT INTO `account_number` (`id_number`, `id_account`, `number_account`, `is_active`, `created_at`, `updated_at`) VALUES
('55a0813d-fdf4-11ef-a027-42010ab80003', 'f4c74c9d-fd6a-11ef-a027-42010ab80003', 'ChatGPT Plus 27', 1, '2025-03-10 21:12:12', '2025-03-10 21:47:05'),
('ae0861cf-fdac-11ef-a027-42010ab80003', 'f4c74c9d-fd6a-11ef-a027-42010ab80003', 'ChatGPT Plus 26', 1, '2025-03-10 12:39:16', '2025-03-10 21:46:58'),
('de599a4e-ff4b-11ef-a027-42010ab80003', 'bb11e686-ff4b-11ef-a027-42010ab80003', 'Netflix 37', 1, '2025-03-12 14:11:18', '2025-03-12 14:11:18');

-- --------------------------------------------------------

--
-- Table structure for table `active_session`
--

CREATE TABLE `active_session` (
  `session_id` varchar(36) NOT NULL,
  `id_serenity` varchar(36) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `last_activity` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `ip_address` varchar(45) NOT NULL,
  `device` varchar(255) NOT NULL,
  `session_token` text DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `active_session`
--

INSERT INTO `active_session` (`session_id`, `id_serenity`, `created_at`, `last_activity`, `ip_address`, `device`, `session_token`, `expires_at`) VALUES
('309bb875-ff8e-11ef-a027-42010ab80003', '7d5d7db2-fe0f-11ef-a027-42010ab80003', '2025-03-13 05:06:03', '2025-03-13 05:20:15', '180.244.167.8', 'Chrome 134 on Windows 10 (Desktop)', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3ZDVkN2RiMi1mZTBmLTExZWYtYTAyNy00MjAxMGFiODAwMDMiLCJpYXQiOjE3NDE4MTcxNjMsImV4cCI6MTc0MTkwMzU2M30.Jr3SXNIbLZ7ak-3Lc0e2GbGCM5VaAW9DZC65qFIXaio', NULL),
('3e907c77-ff90-11ef-a027-42010ab80003', '45b2f51a-fd05-11ef-a027-42010ab80003', '2025-03-12 22:20:46', '2025-03-13 05:27:25', '180.244.167.8', 'Chrome 134 on Windows 10 (Desktop)', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI0NWIyZjUxYS1mZDA1LTExZWYtYTAyNy00MjAxMGFiODAwMDMiLCJyb2xlIjoiYWRtaW4iLCJpYXQiOjE3NDE4MTgwNDYsImV4cCI6MTc0MTkwNDQ0Nn0.SR05vQyJ15zqyVolN8iLaOTtXusHJmTQRRqpY-wTdFo', NULL),
('657bbcb7-ff88-11ef-a027-42010ab80003', 'a01f742e-fec9-11ef-a027-42010ab80003', '2025-03-13 04:24:35', '2025-03-13 04:24:35', '180.244.167.8', 'Chrome 134 on Windows 10 (Desktop)', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhMDFmNzQyZS1mZWM5LTExZWYtYTAyNy00MjAxMGFiODAwMDMiLCJpYXQiOjE3NDE4MTQ2NzUsImV4cCI6MTc0MTkwMTA3NX0.4tlTGv9rM35XehSFdMB8Z4wxHjrreZl5ChmhmfKi17c', NULL),
('ba23783d-ff8d-11ef-a027-42010ab80003', 'a01f742e-fec9-11ef-a027-42010ab80003', '2025-03-13 05:02:45', '2025-03-13 05:02:45', '180.244.167.8', 'Chrome 134 on Windows 10 (Desktop)', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhMDFmNzQyZS1mZWM5LTExZWYtYTAyNy00MjAxMGFiODAwMDMiLCJpYXQiOjE3NDE4MTY5NjUsImV4cCI6MTc0MTkwMzM2NX0.5pDG_9Oy2PfaMJOMx1W7-DMp856V8esBDqQfnr5AaUA', NULL),
('fef8d6ea-ff6f-11ef-a027-42010ab80003', 'a01f742e-fec9-11ef-a027-42010ab80003', '2025-03-13 01:29:55', '2025-03-13 01:29:55', '180.244.167.8', 'Chrome 134 on Windows 10 (Desktop)', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhMDFmNzQyZS1mZWM5LTExZWYtYTAyNy00MjAxMGFiODAwMDMiLCJpYXQiOjE3NDE4MDQxOTUsImV4cCI6MTc0MTg5MDU5NX0.BIDVTKPtnnhGeg92Cc_6hzySiWvIrVWFL0R-fmOrEyg', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `cookies_account`
--

CREATE TABLE `cookies_account` (
  `id_cookie` varchar(36) NOT NULL,
  `id_number` varchar(36) NOT NULL,
  `cookies_name` varchar(255) NOT NULL,
  `cookies_value` text NOT NULL,
  `domain` varchar(255) NOT NULL,
  `cookies_secure` tinyint(1) DEFAULT 0,
  `cookies_httponly` tinyint(1) DEFAULT 0,
  `expiration_date` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cookies_account`
--

INSERT INTO `cookies_account` (`id_cookie`, `id_number`, `cookies_name`, `cookies_value`, `domain`, `cookies_secure`, `cookies_httponly`, `expiration_date`, `created_at`, `updated_at`) VALUES
('23c79ec5-ff4c-11ef-a027-42010ab80003', 'de599a4e-ff4b-11ef-a027-42010ab80003', 'SecureNetflixId', 'v%3D3%26mac%3DAQEAEQABABQuhMOvc-ahTlpV6Ql3sH6SosWI2J4S9XA.%26dt%3D1741788647613', '.netflix.com', 1, 1, NULL, '2025-03-12 14:13:15', '2025-03-12 14:13:15'),
('59ac5d9c-fdf9-11ef-a027-42010ab80003', '55a0813d-fdf4-11ef-a027-42010ab80003', '__Secure-next-auth.session-token', 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..dvFb7SjJDP5dYSfP.qbF22aLS_Pq-nMGZXHNU4oEn7GMksf8gQBTD1zkzgH61fXOXoL6u0PdiYSsYjHomDrlSdPjy-sIA8-ZtnLiYgUGrmsGW_VVqZ9X1kmIbfwAoWMdrjBkM7KEYaoqgnxq0vZX89li95nxl2wB8B4lpT7vJE6tJFeSpwzuSU6KEFxB3wlWkcE4Pi92CjyYMaeneUDlwJd0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hkMx0FDMYT6Hi2J1-0ZwV93SiKUHrBeugO_dC6syAYUmFWMc8GVDqUl9ql6Pth24rrqr-_Ba-aT0duUTDfs1x0si8q1vJtfkZs_HyOyV3zMLyYv9FMHjG92lDv8SJNrT1cI1OrNTEzNrBUy6AozgL0v2CI_-Ys-x1zqhb7qSAUTQZqm7vBsDUW0Ox1Ugb_GQYv4bHrAcEe1uXaTspAHWqU3mat27JPXJ5wKZ-DQ6dUag1eXzNZ9anGQFGjQOmICOH61Ng5to_Z74ldq_qfFjlnkSLBtKtDB.qqZ3BiULoYh6abF8wX9q4A', 'chatgpt.com', 1, 1, NULL, '2025-03-10 21:48:06', '2025-03-10 22:55:34'),
('668d3788-fdf9-11ef-a027-42010ab80003', '55a0813d-fdf4-11ef-a027-42010ab80003', 'oai-sc', '0gAAAAABnumYiBURWsEvvV89d1x8zE3Uvj-CScYo8NpEdBmJ0eF_TURW1UhGDy8xGZfykaFwMQYPv46Zsmk2WO64sKlmsU5oGq7yuook5jUvc3bbACCc9WaDoptlO6u8YzBqpDOS210LI3NDtPZp2eq6enr2aBiMKG9n4sjahZjMG5kgPS_wGct3DndWhIl6RgsdfCMunqxNen5J37kDbSavoZzeaCdIOKk9-dw5qOokVtNtncTtf7N0', 'chatgpt.com', 1, 1, NULL, '2025-03-10 21:48:28', '2025-03-10 22:55:41'),
('987011ec-fdb6-11ef-a027-42010ab80003', 'ae0861cf-fdac-11ef-a027-42010ab80003', 'oai-sc', '0gAAAAABn0ZVmoKUPW4XEJZomjSZJgYX02ChH1RzV_4vUbzkJmEJsLQc2NUsNRRjiuQwcV8_oYpP_I75TbkaoKYv86-UAAjvN7mzsUZvIUzqARLsK7X0t-2oeo52Ac9y8rLzJhZzLCgi3Q95XQSzMg71tr20f6CFrH4eaQqRAQuMNNJEXM2I2hWOsklf_MRI4PeN0Kq9e72D4GR1XflynFBxFdiQwqEwLzPZh0pDu2zgdewn1_hmiZjo', 'https://chatgpt.com/', 1, 1, NULL, '2025-03-10 13:50:15', '2025-03-12 14:09:35'),
('a696965d-fdb6-11ef-a027-42010ab80003', 'ae0861cf-fdac-11ef-a027-42010ab80003', '__Secure-next-auth.session-token', 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..pimPJdhduh3ZtuQ0.O5xivZSVcu52UrMNWu9-oacQccbzCC2pPosV3zVbM016SyfoqwkmRNIcion41osgsF0dErayPQ_QSi0RAnfDSBmfMir6ITMl2cFGoxZq2ePCOdE3AXVx6utZJX8mDpEf2zc_iFWGoGhqzZkrWtgCfpwxYc2dLOpMJFxYAPgPExAn6KMZowsYq6wkRoDNf74b8BgSK82Xljd81t8to-YOEuW9FTULEknH_XjaRBCEzOfu9X3Mwmmt_Jpu684Oyt9mALswWwvvkAdLEu8Ymk781PTSYbuUJYTPiQIexYCLb3m6Q486QtuvIGj_KrY0BDt4iKNOZfE9oDiyAcTRQZ0dX6s0HLdusLKEdDnOsSUGnlg6_ZsYP9DPkZ-63DQ0J4APCTNdKCAqAGvKVnKvRQpZ5Jpkg0vhJH9uFEbYUwE0NyByR22tAXthR4vubn5qX28rnmbNuKaOVbILSbDRl8g--wx5w7JI0lnDzzhbb5XTthfJq472O-XvdvwqXEWKiL83frp6-5Lpr40IOtiyzXtKJVigr2eqfE3XlAD1CNklBDpP5BliK7eq80ixT7ANtM0iY-kZqWZfw4GlQtufQt_IYbN2IRRQ8Y2tTUFc0uFSiUhS9-JgAmSHEViu7JNfXy9PxwM-lAaxQIcefW4W3VB2-0B-nJUs_Cty-E_TNUj5_D9BPe0ozzWwKtEQO-3JA88qTSRgkMGOChRxoCSrCQa_Y5BxKuHZYgDixiZyyTgtbZy3wHbdXnscHvlnqBf2ZLNgvXjkoPHv6cB1b57zNp6PFWUXhDoLFShZP_qkQ4SM6WhGRBgWgXupq2fsD2jfr7v6dAQsrT7vQ0QpF4DwaOfye02lK7oEot5ecXZA2bbaBYgiKN1eSoFc6n1RHTv9FD0XB5xgwPQKBBDSTedW9ktuyzmlKxXA1H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4lLhmSwsfDjplIHZVlB0l1ih9Nv9KUGaxM54KlB38tKoEURCTgA2yaY_-BOtZWEBnY5gvXEmUfj19gcJdyA1eWOV0WVQVmdpYigbtxSZhRz__qzfifzC5f11Qf2wCJbCAZz2ZlMv5Nqw-ol_jWX83zPbOFaZb1sOpAuzZ4JkkTSBfn9Wf9pN7XVbRecqL4hFzPQ5JiS_lfzTvgVJCDumnOuQA6lICk1xrPq9ET-epmpBcoDVdDzH6zNyfKeg6zWDiU5OxsYsfHS-NqGKRq5l81Y0DmLu-HuK2_BSjDAnbTrapeYIrGi7T3VKt4JTqNxSsshkdxAow2qSfedsvLfPFZteTeaMfMKcaUwuZ35PtVF6jKGN2iuQXcU8wrfPze2PnuNE-SPE2SdT2oQ3gz7kfyseVko5VpT83SC5yectquFV2-f13LNvQHJDRgesp9Z6Lvf0NBbZpxRxBefc6odl7uBdG1GekHsh1O1kA-AFnHm8qMa_M3lrafb0YRqasBHa1cpqsT81LtPuL8yWgnCk0FWF-kHM9gy9uc8rgSTR1v4zdCsIt9CWY2su8XUtR_p6_e7WeXoTnRQvjAIZJPb3XveOMApUCvQSWKcTIiykQq6NI98poBAbYxcPUUKNjvzQ5duAD9cRcGgJ.isRGnYMWgdUQCWYCEtcxhg', 'https://chatgpt.com/', 1, 1, NULL, '2025-03-10 13:50:39', '2025-03-12 14:09:19'),
('f6cf471d-ff4b-11ef-a027-42010ab80003', 'de599a4e-ff4b-11ef-a027-42010ab80003', 'NetflixId', 'ct%3DBgjHlOvcAxKYA4U61nD13YXnun5dTCn4yHXhty7a35FVZy-gD7IF4lztF2VT9RB9b7A9wDHWa8USRFcK-F9mgBt-7ef-INYmr95denLgA-Qe3tFZ-FFHYhTSWjwIDyN3_YKr2KbmynagOaBcJhyL1CT0oxBWVuWFcKGfQwGfXWYT3BWjbbLY8_YtpPIJYv9t3x_TdxxPDZJY44VAqdV4XRPoRhZYTJAXcdywboBlGKpENmniOa0PZCLXV0TZGGiqaZwtry2XyLaU6NAamnjQtL17qzBTrkAY1qimhZelg0i2YXo8mMhov0Xaqr6zQo0lkWVxW_XSgYSj1F5yGYGpK1kLsmu_nz5NXbihFOxIuZaQVR8Dwe7yfaAzdarqEAfC-8OQxwIwF6naqXspdogXBByrZnJ5auTILfWJMAjU6sXagR4xybI2WwHAyBE9VOvgb6Q4pySQFb0FpcTQqOLSIZqJM4Sml7OeSu-KnZzhcOk0fbHvyODm9-8lyq9OamzCgFo2b9JtHglUpa9tlGBlqGrLstriJ2v4QfQpL1XuulscyRgGIg4KDI-eGdYGViaHt2y4Ug..%26ch%3DAQEAEAABABTNPjlMGyNEmildZd8Jzgnh1cmQUeBH7DI.%26v%3D3', '.netflix.com', 1, 1, NULL, '2025-03-12 14:12:00', '2025-03-12 14:12:00');

-- --------------------------------------------------------

--
-- Table structure for table `extension_files`
--

CREATE TABLE `extension_files` (
  `id_file` varchar(36) NOT NULL,
  `version` varchar(20) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_path` varchar(255) NOT NULL,
  `file_size` bigint(20) NOT NULL,
  `file_type` varchar(50) NOT NULL,
  `description` text DEFAULT NULL,
  `changelog` text DEFAULT NULL,
  `uploaded_by` varchar(36) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `extension_files`
--

INSERT INTO `extension_files` (`id_file`, `version`, `file_name`, `file_path`, `file_size`, `file_type`, `description`, `changelog`, `uploaded_by`, `created_at`, `updated_at`) VALUES
('d192bb0a-fef8-11ef-a027-42010ab80003', '2.5.1', 'serenity-extension-release2.5.1 (2).zip', 'extension-v2.5.1-1741753009312.zip', 1042219, 'application/x-zip-compressed', 'ss', 'sss', '45b2f51a-fd05-11ef-a027-42010ab80003', '2025-03-12 04:16:49', '2025-03-12 04:16:49');

-- --------------------------------------------------------

--
-- Table structure for table `extension_popups`
--

CREATE TABLE `extension_popups` (
  `id_popup` varchar(36) NOT NULL,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `type` enum('info','warning','error','success') DEFAULT 'info',
  `button_type` enum('single','double') NOT NULL,
  `primary_button_text` varchar(50) NOT NULL,
  `secondary_button_text` varchar(50) DEFAULT NULL,
  `redirect_url` text DEFAULT NULL,
  `max_displays` int(11) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `start_date` timestamp NULL DEFAULT current_timestamp(),
  `end_date` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `extension_settings`
--

CREATE TABLE `extension_settings` (
  `id_setting` varchar(36) NOT NULL,
  `current_version` varchar(20) NOT NULL,
  `min_required_version` varchar(20) NOT NULL,
  `is_maintenance` tinyint(1) DEFAULT 0,
  `maintenance_message` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `extension_settings`
--

INSERT INTO `extension_settings` (`id_setting`, `current_version`, `min_required_version`, `is_maintenance`, `maintenance_message`, `created_at`, `updated_at`) VALUES
('e6a00ec4-fec3-11ef-a027-42010ab80003', '1.1.0', '1.1.0', 0, NULL, '2025-03-11 21:58:01', '2025-03-12 22:27:18');

-- --------------------------------------------------------

--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id_package` varchar(36) NOT NULL,
  `name` varchar(100) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `duration` int(11) NOT NULL COMMENT 'Duration in days',
  `description` text DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `packages`
--

INSERT INTO `packages` (`id_package`, `name`, `price`, `duration`, `description`, `is_active`, `created_at`, `updated_at`) VALUES
('e83c57a1-fd38-11ef-a027-42010ab80003', 'Premium 1 bulan', 1000.00, 30, 'Mendapatkan akses premium 1 bulan', 1, '2025-03-09 22:50:32', '2025-03-11 10:06:00');

-- --------------------------------------------------------

--
-- Table structure for table `popup_displays`
--

CREATE TABLE `popup_displays` (
  `id_display` varchar(36) NOT NULL,
  `id_popup` varchar(36) NOT NULL,
  `id_serenity` varchar(36) NOT NULL,
  `display_count` int(11) DEFAULT 0,
  `last_displayed` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `promo_codes`
--

CREATE TABLE `promo_codes` (
  `id_promo` varchar(36) NOT NULL,
  `promo_code` varchar(50) NOT NULL,
  `description` text DEFAULT NULL,
  `discount_type` enum('percentage','nominal') NOT NULL,
  `discount_value` decimal(10,2) NOT NULL,
  `min_purchase` decimal(10,2) DEFAULT 0.00,
  `max_discount` decimal(10,2) DEFAULT NULL,
  `starts_at` timestamp NULL DEFAULT current_timestamp(),
  `expires_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `max_uses` int(11) DEFAULT NULL,
  `used_count` int(11) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `promo_codes`
--

INSERT INTO `promo_codes` (`id_promo`, `promo_code`, `description`, `discount_type`, `discount_value`, `min_purchase`, `max_discount`, `starts_at`, `expires_at`, `is_active`, `max_uses`, `used_count`, `created_at`, `updated_at`) VALUES
('7b1fc23b-fd62-11ef-a027-42010ab80003', 'SERENITY1616', NULL, 'percentage', 20.00, 0.00, 20000.00, '2025-03-10 03:48:08', '2025-03-20 10:46:00', 1, 5, 1, '2025-03-10 03:48:08', '2025-03-12 07:43:41');

-- --------------------------------------------------------

--
-- Table structure for table `promo_package_relations`
--

CREATE TABLE `promo_package_relations` (
  `id_relation` varchar(36) NOT NULL,
  `id_promo` varchar(36) NOT NULL,
  `id_package` varchar(36) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `promo_usage_history`
--

CREATE TABLE `promo_usage_history` (
  `id_usage` varchar(36) NOT NULL,
  `id_promo` varchar(36) NOT NULL,
  `id_serenity` varchar(36) NOT NULL,
  `transaction_id` varchar(36) NOT NULL,
  `discount_amount` decimal(10,2) NOT NULL,
  `used_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `transaction_id` varchar(36) NOT NULL,
  `id_serenity` varchar(36) NOT NULL,
  `id_package` varchar(36) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `status` enum('pending','success','failed','expired') DEFAULT 'pending',
  `payment_method` varchar(50) DEFAULT NULL,
  `id_promo` varchar(36) DEFAULT NULL,
  `discount_amount` decimal(10,2) DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `qr_code` text DEFAULT NULL,
  `qris_id` varchar(100) DEFAULT NULL,
  `qris_status` varchar(50) DEFAULT NULL,
  `qris_expired_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transactions`
--
-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id_serenity` varchar(36) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `is_banned` tinyint(1) DEFAULT 0,
  `premium_label` tinyint(1) DEFAULT 0,
  `status_akun` enum('admin','premium','not_premium') DEFAULT 'not_premium',
  `session_token` text DEFAULT NULL,
  `extension_token` varchar(255) DEFAULT NULL,
  `premium_expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `remember_me` tinyint(1) DEFAULT 0,
  `last_login` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id_serenity`, `username`, `password`, `is_banned`, `premium_label`, `status_akun`, `session_token`, `extension_token`, `premium_expires_at`, `created_at`, `updated_at`, `remember_me`, `last_login`) VALUES
('45b2f51a-fd05-11ef-a027-42010ab80003', 'killeeer', '$2y$10$QolGaYKuvLew./Z7RbCYvu1yIdDxIv4nUzVBupcjSLMPsvNbXsvB2', 0, 1, 'admin', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI0NWIyZjUxYS1mZDA1LTExZWYtYTAyNy00MjAxMGFiODAwMDMiLCJyb2xlIjoiYWRtaW4iLCJpYXQiOjE3NDE4MTgwNDYsImV4cCI6MTc0MTkwNDQ0Nn0.SR05vQyJ15zqyVolN8iLaOTtXusHJmTQRRqpY-wTdFo', '9da5f30cb4a8548a3743c58096e398ffae2930c4338f9409f5c3f6b348bac7fa', NULL, '2025-03-09 16:40:55', '2025-03-12 22:20:46', 0, '2025-03-12 15:49:00'),
('653d0f93-fd03-11ef-a027-42010ab80003', 'admin', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 0, 1, 'admin', NULL, NULL, NULL, '2025-03-09 16:27:29', '2025-03-10 11:54:11', 0, NULL),
('7d5d7db2-fe0f-11ef-a027-42010ab80003', 'lawweeee', '$2a$10$e7O1zeRODMQe/7efviHO..S.DziRb2Zf7ffSqv8U6L8wEabPyGrTy', 0, 1, 'premium', NULL, 'cfbe65703b09dce8af11dc2ceffd6372949c1d306ac4b0944ffd0090c09d8233', '2025-04-10 14:25:05', '2025-03-11 00:26:35', '2025-03-12 22:20:18', 0, '2025-03-13 05:06:03'),
('a01f742e-fec9-11ef-a027-42010ab80003', 'halogeys', '$2a$10$T6HyNd/OarXDUg4AvaJd0OteHzB6hHxbMGbnfgvqDXEH/KN474laq', 0, 0, 'premium', NULL, NULL, '2025-04-11 07:43:41', '2025-03-11 22:39:00', '2025-03-12 22:20:52', 0, '2025-03-13 05:02:45'),
('c6fb99e4-fd87-11ef-a027-42010ab80003', 'kiler', '$2a$10$99a38iCu0.DuY3rzahmt3OiBJM9Z5.biQD551hbMdC/DIH7GoKxa.', 0, 1, 'premium', NULL, 'f91ef43eecf395990543e5d4d4bc8824cd80f40bc188496d8d191d518a8b141b', '2025-03-13 07:08:00', '2025-03-10 08:15:07', '2025-03-11 22:30:33', 1, '2025-03-11 22:30:31');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `account_extension`
--
ALTER TABLE `account_extension`
  ADD PRIMARY KEY (`id_account`);

--
-- Indexes for table `account_number`
--
ALTER TABLE `account_number`
  ADD PRIMARY KEY (`id_number`),
  ADD KEY `idx_id_account` (`id_account`),
  ADD KEY `idx_is_active` (`is_active`);

--
-- Indexes for table `active_session`
--
ALTER TABLE `active_session`
  ADD PRIMARY KEY (`session_id`),
  ADD KEY `id_serenity` (`id_serenity`),
  ADD KEY `idx_last_activity` (`last_activity`),
  ADD KEY `idx_session_token` (`session_token`(768));

--
-- Indexes for table `cookies_account`
--
ALTER TABLE `cookies_account`
  ADD PRIMARY KEY (`id_cookie`),
  ADD KEY `idx_id_number` (`id_number`);

--
-- Indexes for table `extension_files`
--
ALTER TABLE `extension_files`
  ADD PRIMARY KEY (`id_file`),
  ADD KEY `uploaded_by` (`uploaded_by`);

--
-- Indexes for table `extension_popups`
--
ALTER TABLE `extension_popups`
  ADD PRIMARY KEY (`id_popup`),
  ADD KEY `idx_is_active` (`is_active`),
  ADD KEY `idx_start_date` (`start_date`),
  ADD KEY `idx_end_date` (`end_date`);

--
-- Indexes for table `extension_settings`
--
ALTER TABLE `extension_settings`
  ADD PRIMARY KEY (`id_setting`);

--
-- Indexes for table `packages`
--
ALTER TABLE `packages`
  ADD PRIMARY KEY (`id_package`),
  ADD KEY `idx_is_active` (`is_active`);

--
-- Indexes for table `popup_displays`
--
ALTER TABLE `popup_displays`
  ADD PRIMARY KEY (`id_display`),
  ADD UNIQUE KEY `unique_popup_user` (`id_popup`,`id_serenity`),
  ADD KEY `idx_id_serenity` (`id_serenity`);

--
-- Indexes for table `promo_codes`
--
ALTER TABLE `promo_codes`
  ADD PRIMARY KEY (`id_promo`),
  ADD UNIQUE KEY `promo_code` (`promo_code`),
  ADD KEY `idx_promo_code` (`promo_code`),
  ADD KEY `idx_is_active` (`is_active`),
  ADD KEY `idx_expires_at` (`expires_at`);

--
-- Indexes for table `promo_package_relations`
--
ALTER TABLE `promo_package_relations`
  ADD PRIMARY KEY (`id_relation`),
  ADD UNIQUE KEY `unique_promo_package` (`id_promo`,`id_package`),
  ADD KEY `idx_id_package` (`id_package`);

--
-- Indexes for table `promo_usage_history`
--
ALTER TABLE `promo_usage_history`
  ADD PRIMARY KEY (`id_usage`),
  ADD KEY `id_promo` (`id_promo`),
  ADD KEY `transaction_id` (`transaction_id`),
  ADD KEY `idx_id_serenity` (`id_serenity`),
  ADD KEY `idx_used_at` (`used_at`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`transaction_id`),
  ADD KEY `id_serenity` (`id_serenity`),
  ADD KEY `id_package` (`id_package`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_created_at` (`created_at`),
  ADD KEY `id_promo` (`id_promo`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id_serenity`),
  ADD UNIQUE KEY `username` (`username`),
  ADD KEY `idx_username` (`username`),
  ADD KEY `idx_session_token` (`session_token`(768)),
  ADD KEY `idx_extension_token` (`extension_token`),
  ADD KEY `idx_premium_expires_at` (`premium_expires_at`);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `account_number`
--
ALTER TABLE `account_number`
  ADD CONSTRAINT `account_number_ibfk_1` FOREIGN KEY (`id_account`) REFERENCES `account_extension` (`id_account`) ON DELETE CASCADE;

--
-- Constraints for table `active_session`
--
ALTER TABLE `active_session`
  ADD CONSTRAINT `active_session_ibfk_1` FOREIGN KEY (`id_serenity`) REFERENCES `users` (`id_serenity`) ON DELETE CASCADE;

--
-- Constraints for table `cookies_account`
--
ALTER TABLE `cookies_account`
  ADD CONSTRAINT `cookies_account_ibfk_1` FOREIGN KEY (`id_number`) REFERENCES `account_number` (`id_number`) ON DELETE CASCADE;

--
-- Constraints for table `extension_files`
--
ALTER TABLE `extension_files`
  ADD CONSTRAINT `extension_files_ibfk_1` FOREIGN KEY (`uploaded_by`) REFERENCES `users` (`id_serenity`) ON DELETE CASCADE;

--
-- Constraints for table `popup_displays`
--
ALTER TABLE `popup_displays`
  ADD CONSTRAINT `popup_displays_ibfk_1` FOREIGN KEY (`id_popup`) REFERENCES `extension_popups` (`id_popup`) ON DELETE CASCADE,
  ADD CONSTRAINT `popup_displays_ibfk_2` FOREIGN KEY (`id_serenity`) REFERENCES `users` (`id_serenity`) ON DELETE CASCADE;

--
-- Constraints for table `promo_package_relations`
--
ALTER TABLE `promo_package_relations`
  ADD CONSTRAINT `promo_package_relations_ibfk_1` FOREIGN KEY (`id_promo`) REFERENCES `promo_codes` (`id_promo`) ON DELETE CASCADE,
  ADD CONSTRAINT `promo_package_relations_ibfk_2` FOREIGN KEY (`id_package`) REFERENCES `packages` (`id_package`) ON DELETE CASCADE;

--
-- Constraints for table `promo_usage_history`
--
ALTER TABLE `promo_usage_history`
  ADD CONSTRAINT `promo_usage_history_ibfk_1` FOREIGN KEY (`id_promo`) REFERENCES `promo_codes` (`id_promo`) ON DELETE CASCADE,
  ADD CONSTRAINT `promo_usage_history_ibfk_2` FOREIGN KEY (`id_serenity`) REFERENCES `users` (`id_serenity`) ON DELETE CASCADE,
  ADD CONSTRAINT `promo_usage_history_ibfk_3` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`transaction_id`) ON DELETE CASCADE;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`id_serenity`) REFERENCES `users` (`id_serenity`) ON DELETE CASCADE,
  ADD CONSTRAINT `transactions_ibfk_2` FOREIGN KEY (`id_package`) REFERENCES `packages` (`id_package`) ON DELETE CASCADE,
  ADD CONSTRAINT `transactions_ibfk_3` FOREIGN KEY (`id_promo`) REFERENCES `promo_codes` (`id_promo`) ON DELETE SET NULL;
COMMIT;

