-- Host: db-master-2.internal    Database: production_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=44163;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$V.XD7iV/mo7E4hyOp7nBTBfS9Mgw/BUxxr58do3vyzr5n89SuQui3','user','ak_9a8d9565d21a46b3','2023-05-20 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$Ap4pCqLTQrw0cJJn.rlxpEzmICvzCEhDlSs/UYkfiBbypOe10P3KJ','user','ak_89be173e389cffd6','2023-04-10 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$8KW.Js5DETEJtGUUzK53LmOgekGHMwsHcD8dgD6nW874pPkjyZpiI','admin','ak_6d0c6fe556b0c8cf','2023-03-06 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$AGuBrqWwaIsU/f8N1w5znK3sqkpO/ODXa..SwgcM/Y4iwGV.xEGHA','user','ak_5622c42709ed3939','2023-07-24 10:03:00',NULL);

