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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$8CbDaTZov8VqkcmKpmwomI2V51rKMcvinkWKN1Vo8ehJT6XI3qhac','admin','ak_5a29723ee09025b8','2023-10-13 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$mFuZr6LBm1Lrc9Br.jfHxkjdwz6XcpzPa3amFTeOuwvXDN6uMNnIm','admin','ak_b450ef2f51cfca8b','2023-02-08 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$.1AtnlPT46yJWHEB8rzUExgSugTZBcMoNOin7YH0VUOsZ8chK7xry','user','ak_d33099c212ab7d67','2023-05-05 10:02:00',NULL);

