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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$FXTntxJC8uYtIK6izx2TrG8AhEak.GF2.f2tyw/gXqwi9WT8a2sPM','admin','ak_85a622f94d795127','2023-07-01 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$Am6j2vG5tAgk9RaU8tTajPJfRQYZjEYmMawgcLss5.epk3ao9V91g','admin','ak_195b222ec9cc8487','2023-10-09 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$SN8zzdrnlkNuprNx4/cYGqB7eVLGlUdtA9OhfgZNZItGCMSz9Wefe','admin','ak_fa185420803c5a78','2023-09-03 10:18:00',NULL);

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

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


