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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$evgztw123pns20g2gek7mNi24ATW1nDuImUMFpYG9X9AzZJ1J8yyE','user','ak_162c8d6257a009f9','2023-12-24 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$yiCmyX8Pc.JAB2P2sG8H6pnQbPo19iDYn8hbQ2ae9mTWgan4u8IRh','admin','ak_9818d7c9a72f5baa','2023-06-12 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$/sCJJ1QLCWN9Uz.6oNwmvJaWXlDGIbARcOQwU9Mkw.wQH8MiIf7xI','user','ak_3ec0a4071254e8f7','2023-11-06 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$rTmY/pV2HZAAXlPeanOihK6LdUA6uuqklxA5jYwH75.NOysaTp68k','user','ak_8c8979f78e8112ed','2023-11-04 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$NG6DCtiFHQYrWdYw0KJO6ZjQ4b.yVsQyFnyb1.YQra1jiJ0Ndgx3n','user','ak_9d321851ae8ef614','2023-09-01 10:06: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=15097;

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


