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

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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$m9wmsas2KZSkE.sbJrjZsvhlMUJk7eWwlzMiSvYQGjdelgabiheWS','user','ak_cc1515368ab56e08','2023-12-10 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$OmcyJtyPYku.xMexrToi.8buA.HhVn5jwosfy6P9QEv.w6YRo0QKY','admin','ak_2038dcba1a689608','2023-05-13 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$flckNOnp1D4a.QJhhxMQoCv1H6QSVr9GA6H9tbYGFUGAExsoPAC0N','admin','ak_0e60f2f220580529','2023-11-27 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$9G6YyIhKWGxChqCGNv1je/2lL1Mo3vhnKdNd1uj6hEYwzSH6hhS/3','user','ak_e65de7efd93ec38d','2023-07-23 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$.Hdts90sCLg9m/jyDZxFQ5QOna2UHqfGw7MAE.1k6pxqd.g1cxYD.','admin','ak_0395a1ffb6568748','2023-02-27 10:03:00',NULL);

