-- Host: db-master-7.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=31002;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$.wSiUhbjt3x8QaPPQzoO70T7U3ux0GiNKtWHT6.eyJ1Tqa710fr2a','user','ak_49deb319485c0d98','2023-10-26 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$4McEwheqOjV.hX7S6V5cNl38d.y/DTo2QKzZ63YwAbF2dw0Hx.o4X','user','ak_85519b6a91691c4a','2023-05-09 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$zTm3FrZhCDGeP8vtIHqpNGI62YF97ktMgoL9fLibgw8HDgqOQW1jC','admin','ak_2871667bd811c999','2023-06-23 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$pbWPlsyyTZLoS53ZAk0egLqmru0U6m3rqNKfhwqJufIG8PJsmg4n9','admin','ak_77b9532665403531','2023-05-18 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$JKh9l7/6M8/eIjYbFZ8soT/5bDQ9pgpqgjt2j4MKcUzc4Gczw9OP0','user','ak_03dbcc4032138722','2023-06-25 10:00:00',NULL);

