-- Host: db-master-0.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=18460;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$CEo9Axbb2XTEG8GIDKYK0fP2WzdYXWMyd6MBDh40biWQeznN9V7fZ','user','ak_df5ac78d6f4e686e','2023-11-14 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$RcgLMCyt3R0L/1nl2xPY1w9AQSTsFjeMa.tx.zkERNHhFuGKr6ONZ','user','ak_5c2459c7af0c5e26','2023-11-10 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$cp.mz/ALi5eJpvYMU4vrJgmZHxUU2buaCQXwnRQ.ZuJKIZSnlsonl','admin','ak_554233c144e8d6a1','2023-06-15 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$FgHMnGL7dkSH7zS0u1x4b0QJKiSTy33vODGljQvZSy6ahF9LH8aRU','user','ak_d124a537bb3bc479','2023-11-05 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$YDvQmvE3huy/A8/N2P06ZH8Gjb4ykbbVY/mhsDk9jcUW.rdLgscjt','user','ak_6adf9c0114d6000f','2023-01-16 10:00:00',NULL);

