-- Host: db-master-2.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=31863;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$ZoE3g4ippeWmd8G.BNZg5JFZrCTDntkCAWbTb9MNJS8pgm0wQiEYF','user','ak_9e236cb4db701b60','2023-07-04 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$V/C7NVyQLZY2craKgM4akQB5AQYmiIOzn5e2SZd6BK5yc7Hlcv0Ze','user','ak_281f9982759484a1','2023-06-22 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$LRHRz9C.HhG5p5VVaIYJMfBRMk6dkz7gKKgxi7QnmFMp1FaGmYed5','user','ak_769f30d45361b013','2023-11-26 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$zWQjZ3/HcsnduyiwXzWiF8M3loCDHZRdEt1iJpk3FgrgGXmpm0EJO','admin','ak_51d673685582ae17','2023-03-22 10:06:00',NULL);

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

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


