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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$y3y1LcX96G2H6FNO2Fu4XmeSrETROwZLz681qeOGga7nVtPzQlLXb','user','ak_cd786d443fafefc7','2023-07-22 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$2he4LH//NeVNtRQDjNUEkC9Oq9vT7bf875RgsTWmCtN1NhVZbKILN','admin','ak_b1f0c6748050fd69','2023-08-04 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Txd9nsOvcdJcuZXA3xCoShqX765gHDchc618GK30dnTIeIX67qlTm','admin','ak_e8af94ad78c07d7f','2023-01-11 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$6/GIXw9BBFIWbz4sVjtBv6ga4kVC7AZhe4XOFQv0lb22CbIrYu1QJ','user','ak_f8e893b467ad9217','2023-01-02 10:04:00',NULL);

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

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

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


