-- Host: db-master-9.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$gAE2Kv1v8wFjdWjig/f/buEw5u4uLHzhquRMBFUCkAJFh.2WME5In','user','ak_b58fc820da61150f','2023-11-16 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$94IAHSFhi8iaET6QqHlxEHVV.qSpOlWxi656cW/Ki4FDo.XZ7AJ9f','user','ak_a15531595cfc3b88','2023-10-24 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$wmZ2H.15pWiKAqFAp1PkO0k01M92m26VozqmChAzT.bcJxCFkg98S','admin','ak_a9552d9c47600689','2023-01-05 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$ZWCB9Gcx8TgJsNeemI0z8AfgkZynuoAqBgC9yNwzPqCj.TjgVjcUW','admin','ak_b7b86a3a0a5a22f8','2023-11-23 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$CwhIRng02uAr3Vl9cA44Z6T89cnzc.PNRzTf3ZhDoa5I2TnVaqpN0','user','ak_86a8aceaac95672d','2023-09-13 10:12: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=43361;

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


