-- Host: db-master-6.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=2084;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$fTnEMwu45O/kM4BCVq5F1CFaZABT4Ld/.bTsUHOcIbQVAamXmKDzT','admin','ak_569015f987a254d7','2023-07-21 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$sJxn6dS2SX4EnfJb6ezpbhoeScoPxQwiPguyAynJtbga2rcGUxAej','admin','ak_278f476dadb66556','2023-09-24 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$w40eK7WJa1XEKnmB1ROAygxK02bwlAksbV4OCAVbxb1A9638KFXXo','user','ak_051f0ca82afdf15d','2023-09-10 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$Q6R3XZ71avkQdFzHCoeJxQ2fi/uIz59AMwnzL6j/X0K29GnXz.taR','admin','ak_5eb62debda94ab95','2023-06-02 10:17:00',NULL);

