-- Host: db-master-0.internal    Database: ecommerce


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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$gCZW.O0Y9swfSc4Hcb9m3qZZH1N4/uUun8Pg1xw.chU7j.Q3ckWbJ','user','ak_0f3028ce2e4d1bc8','2023-03-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$MU/udBcZilbjJGpX45q5kxQZdh.vzAb..3TdjZ/SapCVK9glE8Q/C','admin','ak_c00f7944b12781a5','2023-11-28 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$/2osQLcyZH87zDIsgXsXARZ2SrC5q8RqZsXLwn/f2NWQRbIftbmKt','user','ak_b0aee0daf1b73546','2023-11-23 10:21:00',NULL);

