-- Host: db-master-2.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=47288;

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$JDm66ROYx1CII0XpdXAJQGkXF7cvJ1fvlTKmcNPzw1vR6w25r09ae','user','ak_86997abb0131b472','2023-09-02 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$qEbF9WgrkCX.yARjqOfv9k71dkltEuHCE07cpwJ6yGE2zmBbU5p54','admin','ak_ac297635d166b1f4','2023-07-14 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$cj9dRmqZA45atOdxZiVxSduh1.v.7QmEoZbWsct4WtbghzD9usE47','user','ak_90a8296a990a47b4','2023-01-13 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$0f9spKAvKqv9pQBA5UhWYM5gYUr050/ute3uIW22mZ/poCWHp/DzY','user','ak_70c30dd8dffbb8ab','2023-01-07 10:00:00',NULL);

