-- Host: db-master-6.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=47207;

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$BAbNsnhLpyXZP43UARqHNjtgzcEkWEJzsJ9mCYZwPxHIojg9NwoJN','user','ak_18ae14378bb8b124','2023-08-03 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$Al9vQqIX6oelJ0KPZ.X6N8l4LdOMK/3/DSrMkNMc8ndrV2.xmtzJV','user','ak_cd00f85a63fe9bc1','2023-08-18 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$2yAXJzlpWPWtWUg2Me.4GFW4EDLS4GOnQEX0xnZAnMQonzLt0L.P/','user','ak_8bceecf87d294d20','2023-09-19 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$RjodTOXLaANApvfJpOoK0RxtsAIR1h2buFPFYFKoAu/n3CE3yIPxK','admin','ak_378328aa4c8df9b8','2023-06-22 10:00: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=28918;

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


