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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$T1Esq.Uyu2enuyzyrMT/cH66LYoqVnn1Mj/ONA8PAKLqjgZz5ijdi','admin','ak_02c5820bd4a32a63','2023-11-18 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$2pKmVfogj5hKGuQ0PAZVVioTo12s3/M.lfbQy35fUKI93ZJux6m8v','user','ak_c17909fa4daa04d5','2023-10-14 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$y5Kh7M1oa2f80r8cEhsV90HExmrSg24ZqiXprY9lP4XzpQ0uZIyMD','admin','ak_e577b675febe8e2b','2023-06-28 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$NmMAKt59btlERR4WjWyw5xi9oMVPNXuVJMfXUlb0wvah0yJ748p1G','admin','ak_55e7ed8935a44e35','2023-10-17 10:08:00',NULL);

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

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


