-- Host: db-master-2.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=11034;

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$iF5EvIZreGWk6xPDMlzWsYBxXqoaU3yh0xtN7e4B9854hOBc4AbJm','user','ak_80e7c1cbefc9ff75','2023-07-27 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$mu5fQV0vJy2HshkimlbvssvWvP6U3HCsV.EyyKF0vycTUgC0BKniL','admin','ak_45d2ebcfcc06da79','2023-10-18 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$kT1V4.TC4ouGGAvztIpVMxHmcAfkRCbCWXWs4uE/I0I.LnsoaigtD','user','ak_0bceccc115e0ec7e','2023-05-11 10:02: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=20958;

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


