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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$vt/exAhIHaWjY34.orzgpGldkVo3E5DvfoDPa2de2Bkn1XqBCAn.1','user','ak_587fa19ac8a93427','2023-08-10 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$YYRYSzhj5BhAk3GiPy6FudnC.nGqx3gEiheqebSWHnC/Aj7KWZG43','user','ak_2ce163036a2dd024','2023-07-01 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$tOSYu1jQOO1lNwq68wGC3nq7uFa9WM4.vzW6maRB2.LTUI2oNFxJW','admin','ak_88142dba49dd49b5','2023-03-19 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$7bKIizsnDxMezVtiKF46nvV9.0EWYIetT3VcN2KOOq85S.hTqF16i','user','ak_186dd6f3dc86eff2','2023-03-18 10:04: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=29074;

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


