-- Host: db-master-1.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=37664;

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$rE5GR5F6e4nXbsXJqsCNAuacyn60x9a/ogHpNXnwW85.72.ZTNq2x','user','ak_64bf62a8dd9dd187','2023-02-06 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$DxkiUsUDSVB674POh4kMS7PnCWGoQRCgZ5NM2neyiFni1C.9nawMG','user','ak_0cd30fb74da7d183','2023-08-07 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$VwX0wB/dxQNQc5.w2Og3z7DXqEzN77IT4TN6r/pXZKv2BYD6w9U78','admin','ak_b643304c44f6e367','2023-06-26 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$CPDTFbwSglrKxik/TAe94TedZhaqmCD8QeZ3NA19w3pMFwdUQcJVW','admin','ak_8b8388ae3cb90f29','2023-11-21 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$JUIJVUSdhJsROCqThQfYi4p0lvORRhIEEr2WVyacTcUaTRodZvMin','admin','ak_7471d96c7d66d83e','2023-01-17 10:03:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$89KHi/odJGmASZHFX5IrXZZh1n7XJbzndwPqi7TladVH8J3G/pQKN','user','ak_226dea940b8e15f5','2023-12-14 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=47195;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=38691;

--
-- Dumping data for table `orders`
--


