-- Host: db-master-9.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=1083;

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$4FIQz1Jo9aB94aSntnWQaseDEd1nkLo9ivuV1tv7LNGPki7Nzcm0v','user','ak_8e1c17518bdd5dca','2023-05-02 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$SkBb/yn9YUF7GE8QvgkjeHCk/3QWNELCiEIMMufNZ.J4Em0uSiSmJ','user','ak_b02c10f834500b5b','2023-06-12 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$JsJny964Lu0JKVkljrLz0rpUbasuuXPB3iWXHWwJIrYIkQAlPuPCo','user','ak_c555397194c9126b','2023-01-04 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$rkEUh4lhy1A13WhHoaTSevVKYB3UluK7vYH74.K6k.qgkUB3cNk1O','admin','ak_c6f9e6261fba21fa','2023-05-13 10:03:00',NULL);

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

--
-- Dumping data for table `sessions`
--


