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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$.oiUZ5RhxVLttPorTg6TKpbE161Gon7r5D2sTSu.ktMRECzK9gN6k','user','ak_6352f2f9fd16c687','2023-11-14 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$PCiWZFvMs/evEyV2.Pt1tKSKtZAH.DwNO7H9W7tFYk.zbVY2vHweN','user','ak_9e4e1c5ee7f05f01','2023-02-07 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$A3mnuuk///L5ONrWaU01l0xOtOJQ.sxpo/lc09qoEqs1FgnlRPC7J','user','ak_3a8ba632ff30e898','2023-09-20 10:20: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=38870;

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


