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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$SHWCumO9eSbx3QUqTBLup2N0r39HVYg8lBQPAYWWOQif4PKGro1UO','admin','ak_2118523e209a2dd6','2023-05-04 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$spXQHVQ8wmcebBOdP3hBeM2l35CXpnNcyCobmn10bUBsmH7s77GlF','admin','ak_a15c3b9bab9e9a36','2023-01-14 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$mhBfZxsdMywliYEBKw2ios.8xhQkijQZzpOqhYcFa55xvm7THoAKp','user','ak_ea99271135d3401d','2023-12-05 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$S1bG/FNBnUk5W/7jUql4giIKu2CCNHX4MdtBxm/6aBYfqc0iQazQZ','admin','ak_aad99d0a7d39e211','2023-08-02 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$H26p400IGg2daHcvGmgMxOB/f2EEdaSBUrH2IbtN853vAkYB950xA','admin','ak_21207ab76fa7cf77','2023-04-26 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'root@internal.io','$2b$12$hsZbUTjfZg2sBi4l4sT.6674.6He0sEpIbMecwvNy8iQe335IGhpR','user','ak_8db42d7cc5d7a76b','2023-11-01 10:07: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=42758;

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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=48213;

--
-- Dumping data for table `audit_log`
--


