-- Host: db-master-5.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=15259;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$yHHiDqoMausOeFQcFX8p8n5sZMZxqIFq1/wIxVbD0YdB2ZdesSwVu','admin','ak_e92bb07d0f6f68ef','2023-08-10 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$MZrgw.4UHP8KPgvgzKQ8ZBeLER/dQNxtgpBMZp6qxpNLBt9W0JENN','admin','ak_87021b930f70c1de','2023-11-02 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$gSyphd8Ktg6GD8.jb.rDjTRa/mnA/R4yaIzMWh98/z4DP4iXZSH5K','user','ak_2b480262190e9c09','2023-03-01 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$unIK7c5f3lETwvL9cu.eZcDyA5yrnA0j0H.OvB/LcA68ye.WJf0Y6','user','ak_e4a4ee72a246d69c','2023-10-05 10:17:00',NULL);

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

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

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


