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


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$PRPyU0/dvydgOgtsyrS4NWAtsBMt1QDhcu0E3VSQGMsTx2/ttVac/','admin','ak_0126868448844c03','2023-02-25 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$pxMMSbL3awWVPlkBBraqtL.U/cpm8i9mlkoI8vUIwAJxm8boqDwUA','admin','ak_4ee4d7bf5a4c3fcc','2023-09-08 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$zomeSemoKBUAFAq9xi50MR1XvSxCC1Gc0K2fJYkCFP9bUrQJ5jq5C','user','ak_6e8a197c337f166a','2023-08-16 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$ysv./Xvf8yUO/RwUeSes9TYlqWXHaxrHDY54c.WdLl1iolF4Eqc1c','admin','ak_5f92ad73151103e8','2023-01-24 10:20:00',NULL);

