-- Host: db-master-2.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=38376;

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$iSZsyNWzKIxHn.9vzyhYzF5OZ9hO8RyxvUPJ1FBaeeEPphnfB6lZw','admin','ak_9d82ace89c339616','2023-01-14 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$J5HB3FYun0Lo5kXgWpy5NLLkB2tK3WC1zMXla2mzEQeWQBQSp.9Fh','user','ak_159c515d420fa913','2023-11-03 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$U0FuLeb4hBfzfJbWveM/QazdAIWKkC/cTH7ko9CsOIfLnLC.crE2E','user','ak_2d3e9fd95ec69703','2023-12-21 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$SzBz5DJ50HJKBQIb3xC8aHDFg7Avc.X0oxihukGZr/eT8dQ3TIVxz','user','ak_ed7f4c0f6489d12c','2023-03-21 10:21:00',NULL);

