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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$JYSedbXHFNgZ1oKAg/gqMao2vefsxAdi6Eje6FtFOPh1DMs.PWTHt','user','ak_0e6c86f19e92e399','2023-04-12 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$2BiW.heZSH461oUzVUHua9o5KmJkMYcC80qhfHdmD9baa5met.fuw','admin','ak_72461e793bc41439','2023-11-09 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$56Dz8BPlPelSkEmbxMT2d.LBAIr3KJs0X05QCt7piOoNO.5DMf6Pc','admin','ak_63d88a12f14bae63','2023-05-08 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$730kP6oEohQ1tkH0ZhcxM07rvJOYbO0KjFlqWQA8a31l40bckxHK8','user','ak_db6e50d2574b93aa','2023-03-15 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=11161;

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


