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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$2W9D2oR2XG22ti3MVJO3gEK3FILMVKlcTmUd2VpuFs4z7U8gfXtN0','user','ak_e87ca90f40c760f4','2023-01-02 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$pvrc3s2hHC/co7DQddPlDcAi9WZFsWJF5JVNwjZ7RjmhKIlBLhsUE','user','ak_fd62b04a2bb492c9','2023-08-24 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$5gQT.40d9mKMGDZ8eP7JTOhvGcVxH8EgV50CQODcZlnT4e03tkq/y','user','ak_d711681c46e02981','2023-12-06 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$Jn4qG5TcgJU6Hr8evAmOxEwC5EqA/ftnrJLEw/dCgdfVq1VytMD.n','user','ak_4c070715571e5cb7','2023-11-20 10:20: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=45388;

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


