-- Host: db-master-3.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=25079;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$0mwuSmiG.HOgawJIMnbcwsRZfpbNN7upznSwPboFQVM4.Rl1Y3X2b','admin','ak_6fe979a469f8f171','2023-09-19 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$aGjIH/VWRIW59QaOLqpafQk.zyGxk41Bi50MqxmWEs8SlPRhYh1Yz','user','ak_5c20acd449eb0a11','2023-11-13 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$Huuf32IXn2qu.MsVJrIw4CA4kGynbDaWnEvwYeTuvySNUp0zArWf7','user','ak_e402d18542b8a0d5','2023-12-20 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$ThKAb1DBPJsziwTmlPh5Ajk/331sxvQFLy2Lm8Q5HykpJEX87vBE.','user','ak_bc595743e843eb1d','2023-10-27 10:06: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=16697;

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


