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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$A6q8RMaLuWo559Wp5xx13NYOg7y7cDABm5hjqfJndYSOcCH7pnlyB','user','ak_bdb0654200659dcd','2023-12-19 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$7W0nQz255JVXP9u91b2CRrW.XfsQaCenbzl8xDBoZNf0vADRTGx8h','user','ak_d0cef6154cbc5fa7','2023-11-18 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$sVSpMJZrnSQQqPLyqog4JZ5Kwi7A.2lWBe/IKNqF.kCfWqQ1.REGc','user','ak_fca7162276a07a2c','2023-05-25 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$0Z/91H1nbzhytjTtg3L0uopgw8fMq1zY9RIg2PIPtUv514Bu0nxs8','user','ak_0ecec3afa04c7b77','2023-03-04 10:17:00',NULL);

