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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$YycSbiDMmRRuQ8s/li78FZQi.xeJ9wKLWGB0cawm0wUJPkvq7S7vH','user','ak_8f4b1e55d8028892','2023-02-27 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$TbZxkwF8iA7itIM9Os3e0.AOBtiWY2DHMytWluF10mPkkeEA5jDHb','user','ak_d6caccba49ed9734','2023-07-27 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$smUDGrTLC/0xIHrNjBzLKXyiDwb7Z4J71zAGqBxR0TmKKVJg6oX3u','user','ak_77addc1ab722165f','2023-09-21 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$MR4vFPIOt/Jq5ZRqokIq1OVMaoa95BK.8BQ59u8YFiDNS.EtIEz0Q','admin','ak_da71fa9ba306c9f6','2023-01-12 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$jYjRFZJDvwFq/HA7dlNALqv5Zt3auzEuqdFnqCgkcDno1nwVZGkub','user','ak_dbef8326ba1e741b','2023-08-09 10:05: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=37765;

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


