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

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=13763;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$XkG/8zcSuDPLXHZ52/rz.hezZxvTTAgl7sRXMGatd5UdcBz9b4XZC','admin','ak_e4b1daba4a9b20ee','2023-08-16 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$5ySOXOqZX2gPK0DsKesMsKL0BG0UbpK.fvYAcAkm4g8Z5r8Uu7vW5','admin','ak_bddf7b71be486ba8','2023-09-05 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$CGAeT8POtyfXEM8FCRrYJTebtIBORB3h/YGz8K6ijBfFMsy9ZMcVD','user','ak_65fcb7657bc8cd5e','2023-01-23 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$shfqe6H0IXjGpLvNryWsnMqCDY8hn7hXJfBT19riS1VO4MgvR5bN0','admin','ak_227e4343a5f72c01','2023-01-21 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$PDjon6F3osxtTOsIuv8I6vKphdpKxNi5ugSRsGE8iz8wf/UCbdK9Z','user','ak_84a516736de53972','2023-10-02 10:04:00',NULL);

