-- Host: db-master-9.internal    Database: webapp_db


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

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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$QFadF0tTDBd8TwXI2bDpeRk/lRGEpMEKIYdvtwcqxFMozze3.Wv5g','admin','ak_0c98b1d6f8742556','2023-06-26 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$GnACh4ujQEf1hBBGmlO3vhoU4j3g9ZTroTn2doAOI8eC/W/w/0LT9','user','ak_4f3db66dcb819d00','2023-06-18 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$P0OSdA3M5GPqUpvAIH0h4TwsFICTWgJm.MGz3oz.hPfeX/Rd8LJ0G','user','ak_33cc93fb7a0ac7cb','2023-03-15 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$9s6aL84KaAYV7uffltZNDqHqD.c34GQ24J/qC4aigKd9vB5UasLVQ','admin','ak_3a49cd2b9c3c5ec8','2023-03-06 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$YPSMOIeLHDPJdfEiXzv4lX2A5uvOjkw51XHcB0X.lqc30d5uvAwjW','user','ak_ba7f96466e925298','2023-04-01 10:07:00',NULL);

