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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$v5ZyV1dmg3NYMq2cpmxTvzxzZOtcdcwTz3dDaU41267c3WsczXUM9','user','ak_faecdae8413ec6b4','2023-03-05 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$UHFj0bdR1vAASkgfK8jnJ1IFVp0CQUfkMV81i5uIDPFPH/7tpXlVN','admin','ak_7f88f0110d5e1514','2023-08-04 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$hKaESkMpyVVaoqgfY7i.p6DxRcVlq3ha4.mc8GiwSCg9uZMAX7ima','user','ak_12af567e23c4b4cd','2023-04-24 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$6UGbJoCd8fKv7pM8b.KNZEYf84Kd1UsFHgvTp.vxc8JuxPkwgh5aJ','user','ak_8874f94034a62d2f','2023-12-04 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$6CpUzk0QK7kECnif9iSaR8Z/tqf1xoL9uMhEdL5Zjd7AKgOi0W6GD','admin','ak_d369efb4b59922e3','2023-08-17 10:10:00',NULL);

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

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


