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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=13803;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$k/66LSlGNUizfvmgQX8RtJReTiQAtUjlROHQ6gH2mL3r.YW8qaCMf','user','ak_dc2e6bbdf9a6a295','2023-08-28 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$CwqKwq7GUec7ba2aXLWdbx257KztWDlm7si.89IVsZU.Ooj0o0mea','admin','ak_c3dc360e0e519e5d','2023-08-20 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$iTUa3aVt8k.SuBBJVZTBJVOWTX/XGeJham97Cmfm45.nwlNUPiar3','admin','ak_a83814b3917c018f','2023-10-08 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$wUUTAcySatOp4SET1G2lZMs56unY2OjDIRpRTs1aqk19pWYF0f4am','user','ak_61e4a3c731f88820','2023-09-16 10:12: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=43479;

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


