-- Host: db-master-9.internal    Database: main_app


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$GOL4TeoeefDMKIwywKc1MkC3AabvOMKMu5rk9Iov7mE2MxaF3qY6o','user','ak_d5e1e6f8f404030c','2023-01-24 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$ry8boBW3.ShVwp2QTPFdPWqpyfxz9/bKg9CdqmSCC.UtZfNA0NdZu','admin','ak_f1211eff6b17d4c2','2023-01-20 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$vTu1EoS/v0g9.4ujcrGa2ISVOTWw.VSq34vW9BAOhkQ.FCKZys0kI','admin','ak_81b0a64d7fe22e8b','2023-05-24 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$magWpkhDsZG8683hKvsOeDnOZIRBbTPFgPXrbMmc71vLDQNbabs3X','admin','ak_0d1d173731c0475b','2023-07-18 10:02: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=15752;

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

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


