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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$KYyiaIEwH4F6yUKly8m4T8oxrByXY/OCNeHZVRkh58IuNvzHfh3Sq','admin','ak_a2c775fe7b854006','2023-06-07 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$b01Bi3jDqmoTu/Cou1vQYbunC6wz03ZRlqiVcgWgYEei9zeEODKCl','user','ak_0c7735abc23da2cf','2023-11-14 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$gfIqvDTtlZpKBAzCTsFnLTN60I7o9LY18ZqyNG1CiOVUBvECEKpAi','admin','ak_15e0ce1e576cc647','2023-02-18 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$PFcyb6nvOcLnL9y2v65x2Gj4jzadRFN/tZySuzWAKEt2NeBSnq2JN','admin','ak_6dea4eef610e769b','2023-03-08 10:21:00',NULL);

