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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$1GHWdnyTk4wg8LEdlOL7kDNPIs0tkfCMHI6VFk1dUmZ7vDiSj0sim','admin','ak_3ba631523bc0c0e1','2023-03-08 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$atz3FJTYnIfjq075IepVo9StN1nC6d.raUjSf.JhoH5Uf4G01DHKY','user','ak_7c96aa4f321a2e41','2023-05-03 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$gNcBGNQs/WncES5pHtalf.DgfuBhmBTDiz26UOsha5Nx9VYRPttdL','user','ak_a2c55a9d8f7e814b','2023-01-24 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$yLS8BC6Qr1AdnotopccE3g.g4nfQK7.x4wDe5nDi1Nh3tQ9BPZusd','admin','ak_9fa2b715f86e9a02','2023-04-22 10:08: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=30394;

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


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

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


