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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$4vRkdjsBHYx0aKNlaCmH0tGAhnNbknRdBKYtFkveD46nPhJfrFzWW','admin','ak_7590f3ba8637463f','2023-11-24 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$zQqwHytws0ej02oQnOSEfBi2Au/vPm8A6RlNA6QHU37tbyKrrs7y7','user','ak_0260b9efedc13d7f','2023-03-17 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$SliOfVuy8hpzlY4QwddqwKIWQj3wJ2CIUBdiAxzy5HdEU/Oc3/uLk','user','ak_c6737073f3e00c0f','2023-02-04 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$txxMu0uEEKQRGm.fUepzx1UJeg6SFDDe1Xt6Fco4MtrPjNpe69EDA','user','ak_7edf1d8d44e42927','2023-04-08 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$PkJwMnPYyt.W/mOtkEEbY31MQsSkKVn/RghtBOo6v3nsexDdgCQHH','user','ak_eda4a9767e9c2268','2023-02-25 10:08: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=26472;

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


