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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$kwgVCqrr9q1eR75SliHjgdbAsc/6iL/I65.XZbXuW1dkV/7b/vyYW','user','ak_bd8c2d5cf6820348','2023-06-05 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$pjNvtLzpIdvXkqibMc3EHuZanW4AGmrELWw48.YQAEq76ESth62xM','admin','ak_6a491be934194d69','2023-12-14 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$k7eC.pWL0Oe61vD9tGgxTrNRttMhBMHb/lYlRAydTz0k97nj6ZjOx','admin','ak_23432fd270da63d2','2023-10-12 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$hs7VEhKXex6rflp2g.A85WWaKbDSR9qob5YmV3teDceWLmalRqiY2','user','ak_6382ca92d6d18743','2023-07-11 10:10:00',NULL);

