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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=4135;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$U8FgZeW8r43JZyGyh2ErZMGxd6r73BmnjzRWBNS9rwEuprxhWrY1l','admin','ak_9bae5cb58df51450','2023-06-08 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$8kspQNN5VViXGvu92ONV9Or05.csVGeKP6UXxCniwFLFfTwnlFi6N','admin','ak_5ffa3c34f75e5986','2023-11-07 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$rOQX7gCqyXI.NXut3dAGhFPsP8zh9C1kkXMBF0/rJ.G4YTNKqJ1Ep','admin','ak_7f4d996e18ebc1c1','2023-05-07 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$DPNAj9Lrkazkrn3LYA5M6d/qnTzNGGoW6.r4RsCPeSrq3dngmGPbc','admin','ak_14be4d09125a4c74','2023-10-28 10:12: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=1707;

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


