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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$qcD9LA6.FY55aKSINfHXi/W8XKmn7/fW30Mm13M2EfW/P9Fbx7Q7n','user','ak_c92dbb9661f16937','2023-06-20 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$XSXKX8R4Xf.rVOuaHYN0y5dh05Q.3l6cAOF05kyWntshdW0e20dTl','user','ak_ccfa7ac8ae5bb432','2023-09-14 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$t7uQkl0scOQKJCkVwzheNkeewPwX0KvM4oBXHJmpBJth6/5HloF0Q','user','ak_5e1af8bfce133f20','2023-01-13 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$1tok8XLNiZiKuR.LFGD069edjszCnaSjPjm21YSBE51rtKgDnsBqf','user','ak_b19696e4f651469c','2023-02-01 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$6gWwQyeHExp7Fl/JFa9ydPQpOO2rBHhLPEPIYx40nmdvegjJon3rM','admin','ak_cb6635512eb9e552','2023-03-27 10:02: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=38760;

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


