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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$53RNMwG6qyKm7t9zuO7ejmIxmNupgHDKqANtsUMC3ofxL4DeCa6hz','user','ak_15860ed971b9a8dc','2023-01-26 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$JnJvXeEOYYHV2/lgIhv0f18tBDTW1UYdnKHquUvjSMmUjXbpYeC/p','user','ak_4da59e520e1d7f6e','2023-01-15 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$lfc1EgJy3HhIY.BwZ8e2exnGaVoBCY1GUtS6LSkXdgTOju8UZAbw2','admin','ak_ab0e37334402faf4','2023-11-07 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$hO9g1DGAo2AWSv9lPRUS0I0la2hyy9N0XQ1J.k27fCsI80jHIXc1X','user','ak_d98419feb84dbb25','2023-08-08 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$fufg8a0lFRqQD5XM4UbQEwRKGV38LP00zV9Z9KhzhRVzwPyDeqj28','user','ak_c0b161dc0bb0e4dc','2023-12-19 10:23: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=44117;

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


