-- Host: db-master-0.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=30352;

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$MIQnxNMYgVxfKKVlrvSebZZbsGBUXO97sQSq/I6lFGcUUeTb3vM4E','admin','ak_ffdb1032f752328f','2023-05-09 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$OsbRMdnVJkI.w.DrssebRMaEkhl2yaFjongFvCewVtWrFeJ2u1gcy','user','ak_eca6af9d29b74bc8','2023-09-13 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$0iNPaP4p/U8fWWM.tMibmb2.rW3soTJNn68S0MpmoSSxotebhH61F','user','ak_c921bf484d7ee400','2023-09-01 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$2POk/ceMozpzClQby9JRhwh//Sv6Nn1nKQbd/Ifiv1.YoZ9We3aUG','admin','ak_ef4faf9718bc3ee4','2023-02-04 10:22: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=39940;

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


