-- Host: db-master-0.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=43003;

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=6289;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$OVQxZiYvZgC2UQ8UsFQjQrFMArZw4jbJ5myEPvxVv44GV0KJwP8Dm','admin','ak_ed6f3bbb3b8eea00','2023-04-02 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$r9q58J6IQDfYUgo/h4eL81oidZE6ZmqoXiB5uu2.KLJD7vTYriWiB','user','ak_c4238932bac32303','2023-09-02 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$AkF03uBCRfZiw7G2CCFkrqvt/u70YzVBSgSOy7u60w7QZy8xT6p9c','admin','ak_abc19474e2f42a31','2023-01-05 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$q53KJXgW02sWvuN1S1D8Q.nfOUtbBINvdl4i24Hc86rX/NUWSXbTt','admin','ak_f8ff565d0acc252e','2023-10-20 10:21:00',NULL);

