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


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$n16dBIaI7PMeVRbMfeKGvI3UTs9u70WuXeivEhYWLA9e5YlkgtznQ','admin','ak_2932f481a22c6869','2023-06-04 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$kpUF/wSWl9c1YAWHi.Zp7uC1b6uh6PR0T/cBgprMBaez/Nh70Ec0E','admin','ak_ac4024cfe71c4850','2023-04-20 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$Nf9UFG3GoRAIqLDOPiofhE/rLQtCzY3AyCM.l38.0xv8zdU7om.aY','admin','ak_8e8efded75b98245','2023-09-18 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$IFg1dXReTv63qZwAyZ/IY4qWvZU/SchjXji27jCrE9g4Q6.mIl9za','user','ak_addd06fb9185d8d4','2023-08-16 10:01:00',NULL);

