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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$vgbXeKnJERsBHpcwD/T6/OwzH6Eu7BywGtVnI6nV/W9sAUS2O/i39','user','ak_4891c3b803f4d86e','2023-08-19 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$0NUb9fGWa7xuiBzbUgQsS/JasSS4sMh2ELCSO5jfJpvY1BW9x6qoy','admin','ak_001255f13c4b12a7','2023-01-19 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$14qRjWvpI98J2d6E6M48bCBURlJreWP1kCGp3jPEkj6NVNBDTUsYZ','user','ak_b9b7692fda55d384','2023-02-24 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$s0wVe3qFCFR2Ip1ICKVTgCq6pC5odC.AxZZ6R8k4atf76CQ0Ah8dA','admin','ak_cbe709821614db03','2023-05-20 10:06: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=3256;

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

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


