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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$139Urp5P1iC9n6KrLoqDBzcXjKmIMj7quoeFWJ.PodUsN2un9n/.j','admin','ak_2e4011aa9f8eeab3','2023-11-15 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$MG9qb4LoGPDZ6BZQ0c.b6nkm8EyFiYRNFTTfN3R/ONZ7I5K7iDa3h','admin','ak_6ef61195c9c8aef1','2023-02-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$dm6Zt9FiuoO1GKNlBANE1R27vQ3OoK6gcINNVktP5YhkeHx.S/Fnf','user','ak_f6bb05c4d01c96e3','2023-07-28 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$6YHctJapCVbQU8jbe.lLynlrRASXYThCwaCCMhm04aLe05sYbLrXx','user','ak_638d576a5915adc4','2023-05-26 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$3lgpIMWhWX92AbEtTCZcjeTi./AF8A3/u.FDCYwgedwvuFjozBW7F','admin','ak_26acb013fc673500','2023-04-12 10:05:00',NULL);

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

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


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

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


