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


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

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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$lR8B96LC6nR.MB5IIcrWSIbNHmwjw/skZIDbplkpdNy1TsW/wO9MJ','user','ak_4e1eee3e1897d46e','2023-12-24 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$wrMSGSwzHH708bO8vTm9OYw/1s7IXmWON/jQDaYEWrLxU7zYPXLr/','user','ak_3a001f5e92f35bc8','2023-01-26 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$/fSCl1iDgr8v9HVRTVQT8faGAf0eMqQQhArOqIY65k9GTWPNlHC5x','admin','ak_dd1590f674a757a1','2023-09-17 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$ggUVfwVmtmlt7tSsqVhLpG6WwiujY/p4w/dSq.5PHxeVv0jgr3271','admin','ak_155a77195415684e','2023-09-22 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$qzCA94StU49BbXLKhED.w7ehsA.BAXGN1iN86xdMg1iKsBdv9SG4z','admin','ak_5979438a62ee75a2','2023-10-20 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$KKW2v7.jhUH5AUWwfFXGIU1.W9uyoZ2dner3mp6JmRPMWZgBjTi9c','user','ak_1c7c68958cb655bf','2023-07-09 10:06:00',NULL);

