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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$YXLSGa.MyWDnlx7MkafVRu2vGsLYBx4AP8QVIuzYoijXVmF2C/JF4','admin','ak_bd3387bac8aab04d','2023-03-13 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$8wO/LvL.hwy4CmrbYTCpkw.vLM4PKxPZUpsUJy81JSumTnjzcLAeG','user','ak_03063f8bb04ae3d9','2023-07-03 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$xGpYNR2sQbsSlSase/d/j28up8mjceL8erj4.B5V4s6d/hdw7exxu','user','ak_abde2d60e49fd6e9','2023-08-09 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$X7ZhXz7BM/V0Ct5arp8V1dW9ivRia0zK40NlHMb.0892vGjQ.xesO','user','ak_43c06eeac340bfee','2023-03-03 10:07:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=22250;

--
-- Dumping data for table `sessions`
--


