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

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=41049;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$D4FBu1Vm41a0lxE5trFj4GCYoq/yopwV8VtW9W.zDbduo7luEUBSV','admin','ak_fd309738547d0ebd','2023-03-23 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$Yzfc4VT3wSx3jrrMDSpVotFIqW7owm9okgVjeNsthAdlvh6S5j4RC','admin','ak_e5f56f3f1fe21831','2023-12-11 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$2veT/9TxbQ44T6cmIlRN7RC6Gvs0CJ7i.EK0vyF4yYV4cEJedzm4p','user','ak_4d5399ef6a6a8c56','2023-06-08 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$VVRYXrPi2GMfsRZcQl7Kfl0yDnU4zXOX0EpSehBUJmuQBYme48xI2','user','ak_c24865c8476c2ad1','2023-09-04 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$UavAyj/zsl7ErTssAsYutZDk0zHP66Lh1maldsmhcAteXb6J1BWS/','admin','ak_9d409a79b6fccc65','2023-08-09 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$acfo0uZtpv60n/TEfw8xOvuIxUt3zsuMZtfEH.tHgISURSLen5kbO','admin','ak_eefd81e829cc121c','2023-08-05 10:23:00',NULL);

