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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Fm7dhcSokm7OD2ma4KC4JRS.UXeeuoLLnzz6gcj5.6RE3DJbNPXcL','user','ak_06c75f59c207aee5','2023-04-15 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$T7mA6RFhz7aZwabAZcBKiIcaWfQwOpUQngmowXjzCJT2Jyiyxq0bW','user','ak_13af1b6e405dbc99','2023-11-15 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$C0HqMofJ3mdnquo/M7Mvg.LlvxmcnOvNs5xwOZRM0iUSGqeV2YoRV','admin','ak_768b9c42c3497faf','2023-02-07 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$p5sME6gQ8egHAe.l7qduURKxnz7UOgKRpCU71S5wNUBMQ8VQCo5Lw','user','ak_a7fb308362b1d886','2023-02-13 10:14: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=45900;

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


