-- Host: db-master-5.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=38618;

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$cW2Slk6knNcUqnthPi0L1265jzC76JCXXe5D48lr7cLW.zr.me3FS','user','ak_5fe7a2cd985fb83e','2023-03-06 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$keFTsqAJ07AheKXLoAjPLnmEedjVHDQYNhUe39mgCyeBQU2QGllvn','user','ak_b36ac70b3de377ec','2023-02-25 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$7EUQfA9fNcaZTBhAnJZW57HauoIPuFNmUdDhV2AfkPqZoFBmkFR9M','admin','ak_635881c8ccf21be3','2023-10-11 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$/JRjKHg8oOiMhGUbi2cZDcD7EasV9VytGRA2GvI6ywjP6dP7qT94g','user','ak_76fc3595b695b207','2023-07-04 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$InSkAuA47Q3YAscVAnZDjsVP4lxpeEYxCi2VdoJdKESt1uSSD2CWI','user','ak_dd3a24a3816cdd8a','2023-11-24 10:08:00',NULL);

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

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


