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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$d/pYs4xvWjhkI1zuvlGkTLISxzfE8zv6CqZh9d1JGtIpyZhjDS.Zf','admin','ak_e62e73e1809a0388','2023-01-09 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$RL4ak6s2bzc6Ay58Xnz4Vk14K4ZUkYLs2KpLoV8HFrzXfcVrc1/.q','user','ak_3436edc6a53c49b3','2023-06-01 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$5kSqpWJSMpVxU0ky93BKBz8cSQmvCrcOCYXyxV9yBmNNJ6b2h065r','user','ak_93b23b1a1cc8c238','2023-06-22 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$6OiTJpWtrMSEv0rGfLNMKtdWsMUF6O/41ilsZ37PaIyY7KHuOCCv4','user','ak_13fbccee915a490e','2023-06-07 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$LdiEftknch3VVVjc3UIJpLvLcHxOgwGHoQvaaFN8cvljgEsU5/F7J','user','ak_8de79cf96bb39c8a','2023-07-12 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'root@company.com','$2b$12$JS102m2WYQeke8jje9W2Jq9WSqn39iDmSaZIhJ3ZLRIQbdgrBxYM9','user','ak_23903251f29af20a','2023-03-06 10:19: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=37398;

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


