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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=35069;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$45SKt16nItjsm2iAp.TWubk50SeevaV7Mz0j8tzW6EnezRjw5hsPy','admin','ak_b12cee0b1b9258a1','2023-08-27 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$jewQRAGoZwcCCzNQJgXh/QQvmAXQ.uhYZGOXgdN/OLfMFk3dSTHqv','user','ak_eeda462313bfabcd','2023-02-28 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$XUceZmAyn4IYxz/WOoIImTVZAaMhCunDMtyD26j62VQt.b4Ts2.1f','user','ak_906c706a1c214987','2023-02-07 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$.wVX10MIvoQ7j.Q6zQORyt5c2XjjrWQNIpCZAppf/XTQRWK7RBsyn','user','ak_29553fa2244ed19c','2023-09-01 10:17: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=15044;

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


