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

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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$7MC8Qijp44FrnhiAIvy8SdjwwHgZwCFOm3qcTWsePZdn3XKXZ4ZIY','user','ak_ed8611be0ee143a7','2023-10-02 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$LCWgGw5RMl.ON4KTzePvDdDWve29iblefAqaJcGUmrKokywgM0Njz','admin','ak_e1a8d1838453d42c','2023-08-27 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$Wuj4a5xoUGuFwweZnWEw77wzvmqjVuQJ71VPRia1FfnEv95phGTm2','user','ak_9a89727aff0c8812','2023-09-14 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$Tp/aZRlJXfXO.8mT2NO3JZU7crfy/vTBQjhg1.4/Eh6Co9U6aIiOV','user','ak_d5bea1cbd5906ce3','2023-07-13 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$B6scCWIjQfshxqxT.5XONMK3NTxlLZaAWM.KeGx/yvymy36AgraGj','admin','ak_806822bfcd8cdd6f','2023-03-04 10:15:00',NULL);

