-- Host: db-master-8.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=15751;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$Y0LvEdC9N5VilFY0s5KhxfI9T3v4o1r8J9/ksHsecgNW4cR5RXzbz','user','ak_44101b48a30a41f6','2023-02-28 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$WRL1RoSxu1zAfZwDduO6uhwSum93l1hMK5NPDyftQeNei05X7il2z','user','ak_58c86be20d849413','2023-06-02 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$JWTXop67NJoFaZHlcBOpZZ0xxbCppex5bBoXrnZ0PcLvtMiHcK4Q7','user','ak_fe5b048f6303c778','2023-01-26 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$VRM6mTlO2j5tG3wqN824fTtYRRgLU4EeJDSGqojmJ3YxhvtqOt75v','user','ak_c2c2cbe9436f061a','2023-12-25 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$okPgmMrmA6dJKL.Vav8HIsE8fEtOwrLwO5BCc9dKDDjh8BRfi5zs6','user','ak_1813e58b6f9d6d63','2023-11-01 10:13: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=13350;

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


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

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


