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


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$OG22RBi2x0.HHIh82psj/swzArJuCN/7..Vc/lpze.SDnn0OFrtsT','user','ak_4396e9c669a99546','2023-12-22 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$bb9jhw2ma5i2FRJWmo3b1VPt98qIQwbuLK59dvjjBZfm0bUUdcjfa','admin','ak_be001cc5b1230858','2023-06-17 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$kYoWXsppAX.6aIO9/Lh5jTR6XmafgDzhJ3z7fgtv3sh/2oqP98tEU','admin','ak_91531c001bb7254f','2023-01-22 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$59Xn1xRzLoX5.Qgjb2zUskbgWw55xW8koUXGaIzPyVnsH.IfInBlo','admin','ak_20503c27439a123a','2023-07-12 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$jYci5rnjLduwxXzP6ovDm4.pfZifqTZ./UAzIN33Y81ajtu2bkjYq','user','ak_ca925753985d2408','2023-02-26 10:14:00',NULL);

