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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$0cW.KXV0roNmQLwTaMBMWoSymlV5/LReX9WY5AXVhqgBkON.q90fv','user','ak_8f4d43b1002568e4','2023-08-06 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$sCUTr1dqJm7XahJdaanbfGKqwQ.M/wkpaGazoSED332GSKmBeXTV5','admin','ak_c46f51ffe093f6f2','2023-06-08 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$3xGADvAovZox5Uv5wSC4IrSc3aExbDgnk0ZApfL7R8l2YgZi0sAtY','user','ak_edc5c73a1470fb89','2023-09-04 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$sp0lmnnp1e12GDXYeUF5T.ACRPQWnqJffwrLRuwDlg7UZWGXUuXXf','admin','ak_95c0728065d1e311','2023-05-04 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$qq4RXzDy5g6cDYF8rZmREcXIkAZLAN9AEr25b8LTyLAnIsGg7iEYi','user','ak_f6d7f562d71001e4','2023-06-11 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@internal.io','$2b$12$ay0UvX2uPudQiMOEJSoh/MtCCvNxd51BsWsOZzImMLUJLDOYOyTCm','admin','ak_7a2cfd5b564c1c49','2023-08-26 10:12:00',NULL);

