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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$pp1MBq/LX3HRG0Z4EYMuB5YDazbZwaavPZj5wAjU2Xi989HW35hXY','user','ak_baf543a24c0c1988','2023-04-20 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$BM5A0.TYufBDvEvFbwMsXBSP01O9It95qcBVWx4DSKnkzGbfpHWco','admin','ak_96cd504157e44c67','2023-07-07 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$SGkrDFcZrD6EKhW7VYvGJGf2NitCjXESdEMr8TYnk861IbwMxcE2W','user','ak_9d6941af0fe24f08','2023-12-12 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$rBYmcPzInf7e8vY9QP2e.bz27Z7JUGpF/16zRt5npuTDxZrT.iJwB','user','ak_eef6b3554dc754a9','2023-04-06 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$T7Wq9AD2ryVAVUw20d97gxFG6zzc0cVijdbh20QBiaIIVDGLHdQKW','user','ak_cf76e2e9ba2752df','2023-03-11 10:20:00',NULL);

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

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


