-- Host: db-master-4.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=2276;

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$oEyOxlAdMMWBt5zY9CDX0XipeImXx8Tg/gCi3hevlDV0bW5ixbGKQ','user','ak_776a7db8cd739bf6','2023-10-28 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$MK8jL24Y14S42i772YbshKch3x5ZhFvg7vlvRGNcsc9WzYAfBA/jp','user','ak_35934c99ed94d4d9','2023-09-24 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$B2CsXPiBnvN6am/99rBT8rbXBHlRAXSyU5N0lJkVrED144YTAYngZ','user','ak_67afadd953d730c9','2023-06-08 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$1IOTTKniC8Fo1JqaUScj66YyQFxsR9GKTtVuQ8Qmu3ZGrBZIWN.DV','user','ak_e0e10db9927e95c0','2023-05-01 10:01: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=38583;

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


