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


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$gGbshOEpBavCHr4x3of0IKK8qymyK/ST7Nr9SIR3/BZqcHIL07UoW','user','ak_153c0fab6c2a4eaa','2023-06-11 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$UEYqvK48r1AsRuS6kbWdY6jgiKcmuMKctETWBYKOK1/jdKtaBpVvx','admin','ak_932ce19789e8ac3d','2023-05-21 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$twS4S1w1ZpoGPUGq1t2dkFKUvuwUA3t6snEKzc3KjbbPUWAGaP7dq','admin','ak_cea0761a26d2993e','2023-11-22 10:14: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=29995;

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


