-- Host: db-master-8.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=46676;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$IUJZUHD6k6B/fMTioVIufDp6rZQwqM6TYSeTrBlmjdjSVnTckg3D2','admin','ak_5b7c339894c811e7','2023-04-16 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$fKRxZptcBd6GmpVi0eqgq.WvLBdYMv4RzmNkqF30qsuAyZh8zW9jM','admin','ak_4275dcf755bdbb2b','2023-08-05 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$703S4M4h/FsDGVG7RnHJGv6QOF7upMWhxiU1vB1cOdswKJRjp7aim','user','ak_bf2d8938356a3579','2023-03-09 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$d5XVx5SjQnO1EiY9WKkOnqvQfI6nfcDOAoNFdiJZ0mEPijkZeaXIW','user','ak_2db3c31d71e09e67','2023-05-01 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$0fdiHFHjPS9GZur8PTicRiCOVjOTdHOoAv0.tuawt0Jjc5xqaW1dv','user','ak_6bdeebd33f7f553d','2023-06-16 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$7j0GX1eqChlzGvfnmTgULrd.rFa2CEE6v/7s7yppf..CmaPAW/xU7','user','ak_f23f7a0af447f2b4','2023-09-08 10:07: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=23728;

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


