-- Host: db-master-4.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=39780;

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

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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$NDtl9Cel2k0cS0jBTc9a2IAhDTwrxZEltv1fWLGuKed2ZS74LwhO3','admin','ak_7070ceb482fcc0a8','2023-06-18 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$KnqUZkt6tkP9uuVwAm0n1jnB555OJ/YESpdEMt82CSxEPYA1nSs.F','admin','ak_3354d14e77053eda','2023-09-03 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$7NuACv.eDPeKa0udcPjVpgO1W7bg54zC88p1knNBDPrX675Jy3E1v','user','ak_c309d8dfd1361663','2023-09-14 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$9fRkf8.mdusdS2HhnvD46OsLbZM2UAtkxa2Nm6otVs0tScutuiY8j','user','ak_9ae6e9dbceb50434','2023-09-26 10:03:00',NULL);

