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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$4IwabYZEBI5ztngUinZ9y8OeOz5en.p5s1uDTKmTZmpWoWiGkc7HW','user','ak_ca0733840ff4da2c','2023-03-27 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$6axU4/wEq8Rq5UCn/OaVmF.vEqrOQvJHz5m8nv3jWq1ZYspk9w0n8','user','ak_04f7850e8a60903e','2023-08-22 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$lHI2m3.op6.yQAKQZlpbQjIToXzzKO5alX4kLJEnOwKgEC//ic15x','user','ak_f4e3c4950e377d7c','2023-05-25 10:21:00',NULL);

