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


--
-- 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=34661;

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=39865;

--
-- Dumping data for table `products`
--


--
-- 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=17687;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$0Rs03XGWOj3yrng7SVv5zrljJbt8zRMfYMV9MzXVyc4U/qIiPEH8P','user','ak_b936d0529feb40cd','2023-12-23 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$b8wsEX0EmePNa9WQOU4r4KpjgCBjnY6hG4D7w8oCXVOSS1g4mJfAw','admin','ak_da868bc414918255','2023-09-19 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$kJGcjSbvI6nh5imQG4KA4YBSz25f/x5qXA3a8lauw55LDH4ZOVjja','user','ak_61971647f0244a1e','2023-11-24 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$jys49AN0obK2rGu9pY4ukEHcFwFMTGQiLjoBtVwu0fy..ofH6juuW','admin','ak_99ce5ee37dc71ab7','2023-09-25 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$ghGMCj0kmsz7QZA4vkY7kJD4CjT2R8Rt5Wzidp2nRRQ2kehApAyh2','user','ak_396e8dcabfb1b67c','2023-03-23 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@example.org','$2b$12$tpGrP6xukQ/nV.nFUDkp9oc/JX2FDgcFOVdGBtyzcSlPE8Pk9bee1','user','ak_17ae485fad65bc04','2023-05-04 10:04:00',NULL);

