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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$FbORcg9xtm6Dadh6FqYVaNeHeNq8HwcVhu217tdJ.kPsWiWlu24Az','user','ak_90225c59f7cc7f73','2023-06-11 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$WwQXLv92ETfzBbdQNE.mNMZ0MNjrxq2k8SSNx8rV/Z4zAH0B/NBoi','user','ak_f21bec212d4c5857','2023-05-18 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$iD5EBvZ2sqvyJT.r7jn32/.xDET3GaUnwkmzsKk3D01RihrrXNlE0','user','ak_b9c2c5e709462f2f','2023-04-04 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$3NyfR7qzCrLFVaeaxs0bB/9fnCRl6zI3jzs3pLVbhBb4V7r2.koW7','admin','ak_6c639f67c75de28d','2023-01-16 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$RosaYrE1ewp3bGIq58NDNFxiEX8TD3MYum7cleWv42H2BpcbyIryC','admin','ak_a07e986ad05ec4c1','2023-06-16 10:06:00',NULL);

