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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=46678;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$Wt8AvrpjCYWUuxYGNv5OwHlOO8q5GXckL/tEkFoQAFOVM4srNu2O2','admin','ak_a46b72032345d540','2023-07-10 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$8KAMaeLO69UT83SlG5kq8j47fVGA8p2onDohKjy9f5kYXSOtIoSPe','user','ak_e745391f26fe3b55','2023-04-02 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$Gb4JjQZt29d4TYjk.eG3cRyaJHIcAcaDBWnQ9cGlnlt9Hic28bT1B','admin','ak_9d6f6df2beefde6d','2023-12-15 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$/BzhOAStw77Y5iL6HPkDwRVbj334S.ZSwU/Pqqr1LjvtVlpf4.LEp','user','ak_348b73d390761dc0','2023-07-23 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$A7MduAxxEsAElrXTt1GVEh2Qr74CeTIGVeO8Vc77UpjnMR775Rbph','user','ak_b2a57983784e4830','2023-07-12 10:10:00',NULL);

