-- Host: db-master-3.internal    Database: analytics


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=11407;

--
-- Dumping data for table `sessions`
--


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=32511;

--
-- Dumping data for table `payments`
--


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

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=21658;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$xAOxfS1CxJpnIHR9C1r37NTnuBKJsNHpBIbWH212RAqBJ30LRvYLq','user','ak_0631c1bf9be809ce','2023-02-13 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$UV3BmzL1.rCX6eDGdfCtrAtCki8YJv7A6gHG17Jwx1uWnBlFWXVWn','user','ak_5481fc89b7c802d1','2023-08-23 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$HrFodw3a809HNiyVncvy2MJag/EPXemvju3EC6egiU0MHatWE8TR2','user','ak_599a212ee3635b81','2023-01-24 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$0xMaF4Uent4w0NezDIMSGSTNBchuxhDrHyaDgLl0TZ.0/Ii/9Nv0S','admin','ak_fbc96b5c74a0aa39','2023-06-15 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$xtJcwsi5ThxR1zi8J78GcyBmCmAiv4lo6XQrM7tceOGKMTyXlPuxw','admin','ak_2938df81fdb4b03d','2023-07-20 10:05:00',NULL);

