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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$ni.aS7//4VBvdfa8lSF/YeD89scSXL1SDrGbuRHfd03apeA7nmvrE','user','ak_10e230797ad5b5b2','2023-07-11 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$8RjDJ79eF4p5HDE0uoTYB4mdikSgY7/ILUHzAUwNpllcKAdvm7BvX','user','ak_4154397d0da09389','2023-05-06 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$UtHNO9lvjwIOsNLWAIlhEnuajNazGpPacaIF.Q0nd4itJfdlnBlN4','user','ak_4e94ce7fe76f6041','2023-11-24 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$BINMBIwpY10kGchwJ/r5X9APZHW6grXMU9.5Hn6WNEFgahKfaMNVW','user','ak_57f5d9003f23b4f4','2023-09-10 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$BTvMB0iQ0Rodhb1QsCN07Cm0XX.swhsjv2s0b359AJpZ7jJtdCeon','user','ak_d9842a1256460501','2023-05-19 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$7OWIBinOZofOgLofcZ7qQHBiPCfVdMWCiRX8N.gOdOab8BggTv8Qi','admin','ak_f76ba00951d62420','2023-07-27 10:02:00',NULL);

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

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


