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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$qoFktFstT1envKdLnEAPSLJQb0qu/taokLFh1oCHCAC5XMz6wZFPr','user','ak_a1b126917b9e41f4','2023-05-13 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$TX.fJvCDgmYOfL6zBWbzH0Cv4zLkYdEy0HbNxLpAxmciBbNZaiU1I','user','ak_b0140e6c6e969d81','2023-10-08 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$TbHOIp.uUNeiXrG09TiVv5cHPSFtzX/Zmf5J13iSf.M2Xd3AJlZHm','user','ak_f344a15a198c0a24','2023-06-13 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$sbbDIP/ruGtCvi3n19ZNDEOqxsK0/CG6mubHbRZ1NNDOfz1km4fx3','admin','ak_52623fc0789c71d5','2023-02-05 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$KBOx1DLmaniHLYLff64ozDjharVwf0LbS7mfJr5Xr47JCX4AuFbeD','user','ak_4ba2d4f59676096f','2023-11-13 10:11:00',NULL);

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

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


