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


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$0MAEWkDEn91cnNj24SEmz765nawrYidvkSYaMmKeX3fkL8e1U4ULR','admin','ak_7bc13b5ffda214fe','2023-06-01 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$SrTkkcHGu8Nrmmddew6EXmcImLHW7ZhkIKMGqAOd2EDgsEexlyJpI','admin','ak_f5ad72b18385fcbd','2023-06-01 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$leiI//xb.NLI/Mq1LqZbE8rUiRdgzl7wUCpz0OXB3DlZgO7pFYzI6','user','ak_798892dc213ef90e','2023-04-10 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$0ozMq.CIEwVeTFxbHoShswWbDVImkV.O.b1ZDrSfkw7HS.IypGT//','admin','ak_84858ad3010c2ffb','2023-08-13 10:12: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=37146;

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


