-- Host: db-master-6.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=14502;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$UjiOFgNwRBTIhGu4dDsKLBLV6nKQXiBnl.Bz2RXgmpmQ9EOOaUCxS','admin','ak_abfe8d6154321806','2023-03-05 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$HAzLcyuMhMGRoPBgvCoG2b2Q0ivNb4HIOWwrGhijmnlcyPYH7oOIL','user','ak_99d5fe11105ab65d','2023-09-22 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$hoGK9Y/dve10Jr6IJiQgJfGa8er5ZuPYZyAv/sGPqK5Su9nf1eOJG','user','ak_cdda3c8916720f25','2023-05-23 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$P9hXOp7k2fU2FBvOKx61PqzfGsFBq1uhrtBdhwVCzRlKytrn//Au2','user','ak_e6a1003a7c36995e','2023-01-21 10:15:00',NULL);

