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


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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$9o6Ji6Ow1fyuatg3sB2QLfSi5nSoOARIdmyaiCJODVwV6YqpZ6Zan','user','ak_bed6d5bbc65adb57','2023-01-14 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$UI9Ho9vjHkQhs1k1XaSzOKBN7aiYIjK38OjbWoWQW4kbcIAdlFKaK','user','ak_4e6d96e51b862627','2023-10-10 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$4o2LpCpI11lTslQ/k2UDUa45a8D.PdoKHWI96SrR0i03wUtBVmf6.','admin','ak_7982a6cfd140f850','2023-04-25 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$r8iiB2dj3LRg0FIAJSBD6JVowwP6m/NNDC96W9hhs12Rb.fYo4O.M','admin','ak_19ce3de2acc62585','2023-10-12 10:02:00',NULL);

