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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$oU0lLNR3i.sgDbNh1D5NhMWD8TeJQ3toAIgOAxZ.1qBDSMggUQBhJ','user','ak_7596d9148516237c','2023-02-12 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$dLKddddu2w06.d45hVRznee1TAkdVf/AY8QEtVEHA6fQOnc0ySpoO','admin','ak_99fbe82d613eb551','2023-08-01 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$gXqVep9CyJV09mp47gwy2jYzubOsqnZWdSWSEAtF5hRTlnJ/VXG5T','admin','ak_d04ba32c7527e3fd','2023-09-24 10:06:00',NULL);

