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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$X7lXqj1FYsdmHKbqoka.GjTYkXqv2BoZolYXDDfyshhrEgRaGhbah','user','ak_6db2373b0113fc8f','2023-12-05 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$raEq0pkwptIGg.LEgAll245qgQhjvYXSet3OFe6yw.Ba7G3HlXpTQ','user','ak_6bcde46e35eeb423','2023-08-21 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$srE08w2Q94h//aGBOgct4N1M3D7tEPSsPEexJ4wOWNBf5cOvrmxMH','user','ak_9d14c940dc06b4df','2023-11-13 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$4VlF9TOv69vH7pyOZdGfDrrDWxRHko3Yzs4.rcqqmfdd72sa2ufyj','user','ak_74c866f0754c375c','2023-02-02 10:17: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=24682;

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


