-- Host: db-master-0.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=9130;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$YsC5FyV0tgZUkxbszMToOQ/.ZGf4gnQiwadzOzmCsx3ggQyHcJMAK','admin','ak_7ccb97cce5af2e01','2023-10-02 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$TM94nMmTQZ5FhqbT4lIstCBW36ERjlK8C.YFv7uZe1KiVi3FZtsya','admin','ak_7fff36660a5e895e','2023-06-16 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$HjBBlsYu565HRV3TYwQeCMBuzI4s7w28cq/hbFK6ss5lA3kuAw3IE','user','ak_88fd5d7430813537','2023-09-04 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$Io2WxOeoD.t5eVhIf4qxfH2mqvX.ihf6X2Au3fH5l/b1c3ZyK/znF','admin','ak_d214021df0081c09','2023-06-10 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$MMj9COknL6ygc6z9BuhgK46Y6HahM4aYEqMzxnS4.M9issZKHUcSf','user','ak_e5e0623fd23c70e4','2023-08-15 10:09:00',NULL);

