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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$yRy51dFx08JDizq3N9UGDwRijJBBCf/EHfnZ4RxntKdldjImeoln7','admin','ak_7d9eeec4d6a3658a','2023-02-20 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$NJooFapn9XYrq9ffYcjdHYvt31hh5iPPt5LCyi.Wv3i0EzFGvvUIs','user','ak_0d3486f889410c2d','2023-12-04 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$7r7BmCnkls012Y2sf81FWaZjF7nCM6E9AAz4Kcv/XIhXptA1xnmCy','user','ak_a930896c26941893','2023-01-24 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$GIOc.aOihD3H3U1UBIhV.CEShEzJa5t8.Kb1eJ0g/Ok.m7GJBFj9c','admin','ak_b179b00c32b15cdd','2023-01-28 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$9/xQFtH3XnugN.Q87.LodSlqbNr2QQYFOIPYXkCWwACJMcbzpRnQ5','user','ak_46875cf8ebffe081','2023-02-18 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$0ifJi22trjHHiFtW02H1GNmFvJ0MuR3Ofk0JJklInAnK0ZpvM66eB','admin','ak_1d0ec34ccc34e46d','2023-02-05 10:02:00',NULL);

