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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$CJ8GC22ZnboCu.DwxOm03QsHAXBbOTmKkhghRRlwZkGB3XqWmMKnL','user','ak_8a8904179e6db971','2023-02-07 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$7n7z3KNH.45e1pR.nna7PF2xPvj2nmCi2bEBPzxXGzEN0h7bAv/hs','admin','ak_d51f65abe3333097','2023-09-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$0DjwlEVL5HuxAcw.ENgP24f7V0VhIMdj.cfV3SbaWzPnSizDMIUBy','user','ak_4f0d29c7a70eb239','2023-04-03 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$pGX2vyT0G2nzTRoIWzvzPmIAETr1X2m3jyhMcFMG.d0Hd3IAAzbPO','admin','ak_ee8683c9a6e2b1fb','2023-05-10 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$w0L1RGZa1kc/A6MHaBDHP0eUY7k3eq9PgpakYF0hLzmu3jDj7biqJ','user','ak_199409c34d3a1940','2023-11-13 10:15: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=21303;

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


