-- Host: db-master-5.internal    Database: production_db


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$T1kP5A3OnBa33kI1MJzovakXb48mA4zJeSCDD2qau2u4wxPnNG3j4','user','ak_5b87e31b8824c516','2023-12-21 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$LyIcz2Ew7uTV28vGe/lP.hVtAwjaVFKr1BbUuVtC3uC7poNo2dwVM','user','ak_3819b77b479a952f','2023-12-18 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$QHOqxD/tKVDk/o.ge3YRznq84Slp9ft6.6KeNJl5KddolbH4UmPOE','user','ak_ab2b8930d1ce6286','2023-10-15 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$HH1kH/8Du/P6zxRxLRgJyDU5wm4SnL.w6nUzviqf/nsmG6JKQp7lL','user','ak_17bdeade62279bf7','2023-10-11 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$JGQg/hDuup2N18D7/RLYfZMGyYD8u4Fqw8x.gM4lqU/SRkb7yG3qI','user','ak_8152bb61e6669180','2023-05-26 10:15: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=35766;

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

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


