-- Host: db-master-4.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$s6yUiVBBtCGXYdyt161A96Noboj2M433GmWtzADroVQaYcObcds8b','user','ak_12ac67ca70516b3f','2023-03-20 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$mDs4PDUrW0eceKyhVqsNODCmTpAOEZit3mIT1p/.eEcwADqRsLhPI','admin','ak_90f274d33ed695ec','2023-07-19 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$KD4RSAOwt9yTYoeWk28C1p0xwScF7va3ZLHva1Z0tDIEjjOLqzIw7','admin','ak_3ca87c6d77410b45','2023-07-09 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$dT9JhIjlPkn8wKUYgfHOOIljxWp8ls1GslUp0v1kE4TVaGQ8/M9lT','user','ak_917be7f3140f1fd2','2023-10-12 10:18:00',NULL);

