-- Host: db-master-5.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=32455;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$SWFD4zu5P.IuQwhj2FwMeIIIYixxvJNCYEeKAfaMPVPN2Js9ZKPxI','admin','ak_5d783fb277a2d403','2023-10-02 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$81er/tY3Z9k.BD8lwN.lNF6RBpKdvlDdvztmA.0JDZZ8jpz1Pelsm','admin','ak_fc1c6612230ad406','2023-11-07 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$nV8pezKoDP9znJYv6buQmtkXpbktJhhdpCOWT2P05rgPi3p.DYtJl','user','ak_dc24f1aa8df97166','2023-08-26 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$iJ5qsBQn5r0hqX4UGJ1x/G1KoZu6zalA.V/Femn7M/iFu7nQVWd5N','admin','ak_7400551002ce0131','2023-04-06 10:08: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=3647;

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

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


