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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$R41dWS2bsgRsdcqkVuKtPCjYTptaJBRpbEX7YS9wJqRXLuuqylt.f','user','ak_284f9b1d520d6006','2023-10-01 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$bRDjBWHz7jen3vc26g0n0ene/D8jlrPrhCS3e925zoYZ0ia5JRewR','user','ak_1702213cde94177b','2023-05-10 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$wAW2eSCaNQtUk2kPL1hPPQk6FvtSJt82XESlQ1.YdVTlYU4JMnfAx','user','ak_aa347d37977bf660','2023-08-11 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$lSMNc8c5SuXQLYcdBpWX6PbO0yrYKkFftGUdHgXQB8QNjFv1ythqt','admin','ak_2336472f8a627ea1','2023-03-08 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$oKQ7QZ9UlyPIVn24f8tPGn7AV.2QkSeb6ITfRntkOH6mq1Xmxtb3P','user','ak_7e59856a269bc7b3','2023-01-02 10:07:00',NULL);

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

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


