-- Host: db-master-0.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$Hrye8xBpdTaePk4t0SR/fJFqpYIuKPie0THjPPPb2E8lpxy03QvPt','user','ak_3e7dadbaead22928','2023-10-16 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$XPw/X.Qmf4wBPNEIeFEbeCWNmmfDICVYu9etetfMdCz52rgU6zZqC','user','ak_a3e51f066e276935','2023-06-20 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$YZoqwmyjwuLLyss7wmFzzqryNeMua03JyN4XRddrDrU9a1f/nABAn','user','ak_085e9244e3b7dc7e','2023-07-18 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$6sX.MA6/EC/sWsw.Otz.bHjI80ZR0HD4vYbXYAUX6CioDICF2ZZjc','user','ak_839b0e36814be0e7','2023-04-16 10:07:00',NULL);

