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


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$uw8XDlQMyAkfoUcY7M31Hjgv9Bd3.9Fouv6m8/TzaaL8wK/X/G3xu','user','ak_06ce21738d09c983','2023-01-27 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$.uDbmruHmKsC2LBkHbbx0hRVrHl5Bhpfu9g6KxAQdzIwqAbQo5N8J','admin','ak_37796953fdad5331','2023-04-19 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$azwMwxy9LhdrbOPRiAQ9xbcx3mEJHRaeDObfX0Xq6M5xcnIH/.ta0','user','ak_b737cff679a849b4','2023-03-13 10:23:00',NULL);

