-- Host: db-master-2.internal    Database: production_db


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$WH06NOjKey92qi8gnf7lnr0Vtq8ggmMrqJJqSZhf5wqxg.d6WCUp4','user','ak_9ca0ac882622d67c','2023-01-27 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$.Zbc6rlrmHclN4Vo/mSTUEQJ3EyydAG8vXtORs6YfeI2HeiVb2kkI','user','ak_945f6d5f0a844993','2023-01-19 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$nX0KrMMg254f2UXFYpET9WO1fZi2fR8ouCXuXh.d.QkbE05U6oB0d','user','ak_86764880311e8790','2023-05-25 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$BxxJQiYuKeWObF.HxxU1LD1idSHqtmqeFgNHqcIDI6t32ZDU/VfzY','user','ak_471bbe81771d423c','2023-11-24 10:18: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=1736;

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

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


