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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$jOFrmArimLHMJYt5w31LJntjr5rm5DunxyeWDwBQyiUkadxtwQjVH','user','ak_e6549ee5fd0c185d','2023-09-08 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$ZiP6sAekILDLnvxqjuuYaVYlmljmUrXURBKF0pW55Dm0vlIOplw41','user','ak_419934e7574c4482','2023-08-14 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$Qxm4qNNsZYplNS0W/Y1MoAFeQwxibEZY6XG7.9Y7.LVexGmNM0TWP','admin','ak_56f0ae95e2531758','2023-06-22 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$7lzPvEDgXesdsOt2TWSd7ZrU5eWpPT6SnFuxWXwD/1sS7aP1juaHu','user','ak_6ce249b849fdff33','2023-12-11 10:11:00',NULL);

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

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


