-- Host: db-master-5.internal    Database: ecommerce


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

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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$d9S3Vu46RFAJCZm1w9pmapVYfb5U.JTdQW3mpG6VZi0SFSAj9SHJy','user','ak_5388edccfb4fd03b','2023-12-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$GFLnEnDdnQcaKBUl37Pn/cvCkrg781Zn.WZVXe6bt8PW.7kc85FJP','admin','ak_cce9c68a004ccf75','2023-06-08 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$DRT4NBO3HHA6NY7TR30xRleEZurLWzdyAZMx18tSwymghWqvW9WHh','user','ak_6dd32b8be6399d75','2023-12-27 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$jqcZsfQ9R.BPAlCHx2cc2WaaIsigzfksve1My4xCrw.osElLwI.TI','user','ak_268acfdcf10ae633','2023-10-10 10:18:00',NULL);

