-- Host: db-master-7.internal    Database: webapp_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=42567;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$1RG.0dxPwL7sJydJiYbJ7XlQ6WxloTb.OuSgEjFRBA35tn6h5Ek0s','user','ak_16d74efadbac9086','2023-02-18 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$o9LVOMIRNVNRuwhgWYbA6hKYu/EdIjnojcFWbTfYfIuYsMjojmqOj','admin','ak_e267cc37ebb1d6e8','2023-12-04 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$yxoTCsjH94OpOCF5RJHnHy07voaUsmoVprKEL2ZlgmF4qpUfCSqDg','admin','ak_a4fa6429dda39fea','2023-08-09 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$r48xp1.PrNsB3MLObw78lf9iNJST3PNm/WTdMmOLpYJjQH65VFVAC','admin','ak_6bc3cdbe207647a4','2023-08-17 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$QA6lxJIlUF3xxnxjvZKuty7VFBeGNU0eTN9PCwZQLMUcl38R5elBt','user','ak_59d1011c75da4d16','2023-09-03 10:01:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=50762;

--
-- Dumping data for table `products`
--


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

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


