-- Host: db-master-2.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$3g4F52jH5b4KareuBmYYvzgAao6JWyLjXRmLzIrtMbyPcvt.4tfVs','user','ak_014335cc2bbffd52','2023-10-11 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$j3x74cq7QPU1.Na/F0resF7mGUKCgGOTYQaViKzI.n8ZNP64KDjAy','user','ak_0f348d26392c198b','2023-08-20 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$jLJ/9r9rH0yQOUMvWlFiPpn0I5sxvlUhWQBN61ldehB/ZR0GiNlUx','user','ak_1218c449b412546f','2023-04-13 10:05: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=1584;

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


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

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


