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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$N7rWxGNW4eQiR1v8jcsRq9TmKxXO9o6DYCbWeJMTJoYLDmYhxz40E','user','ak_0bb223abaee884f1','2023-07-15 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$ym1GSWE.2LSI9gDMEu20ymfLviPnKyH2V5qv7WMfBHGg7etWl72aQ','admin','ak_2ed96679782f4edc','2023-02-25 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$WmJRNJ/zmvhyoRetkTxdViarwn9LltqaTMuRXh3msqJD/GYoQp4o9','user','ak_ba3c206745e83e55','2023-07-11 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$h8T7PaZm9B5QyLtv.Au4k6F.tuX5tzSzly6AZF4gX9ayOxI63XKYY','user','ak_92d93c7b612bcd22','2023-04-07 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$/aLpuReHvP33pom8jSd99V5XhgCRVgalawchQHUvIWH33kbVI9g5M','admin','ak_9fed30a11083ee37','2023-02-02 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'root@corp.net','$2b$12$hLDJ.C8TzPyEY1R84hK5FvWJ8KKZzzmaZ.IPcu7sAzw3Rx9auxTCD','user','ak_71f9b91175cefb37','2023-05-10 10:07: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=18013;

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

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


