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

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

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


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$OMwPjJEh9Fb7ICbx.AWPH.IU6ZuSORVQnx.lh.lqr06uFA.ciiJUc','user','ak_8073d71b29eb8e59','2023-02-04 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$RGoPwkYbTGn/9M7.Q1twoAFfuz7a4Eg2nJx4NCff8C49zyJcyq6RM','user','ak_0002894fbcb0be4c','2023-07-25 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$gJW9GgDIGrx32omMWYGqxCSPS0as.x14NzuG7.aT7AU2Z9wpTX3U.','user','ak_b010382f13e7caa9','2023-04-18 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$JOO8sAzIwJDuHskxbN01Se3sGEagqE.Ln2oOaGJqcTCgq6liXomBY','admin','ak_de6b0b851407d08a','2023-03-23 10:03:00',NULL);

