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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$jZtxp/sfmOcmDrgmoIJAsu1xYO.edx4Ipx9eg9NGHnvDC2Y9R/TXk','user','ak_84cfe1dcda2522d1','2023-03-24 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$eSJfr67aT5CUjez/bDeYmGGU3cDwlhirtrT9P9ar/YopDG2Jj/fiE','user','ak_24b7898ae46b755d','2023-04-14 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$IkiYi.wGYeRf5RGOnEIxT4q8WpcoR3hnYapCxrs1NF7.ydF08/bB8','user','ak_e0493573b05d1c74','2023-05-10 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$26/WHr6WBlscIbnSrohkDtfzn1KvATZMb1FvGAtPG1oppyJ5jIN1C','user','ak_1073142ec7f95da8','2023-03-11 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$V79v4/EIfVA065mK3h58ZghgeZjCfBMGp4ncrqJWDONwnNi6.6ZtU','user','ak_39b61caf483bbb59','2023-07-19 10:04: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=26072;

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

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


