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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$EuPi2biuqgPuJUuIrmFPZMa5TQ16.F.n6EbD4u8uAe83MHjz3rKDW','user','ak_40b169babeebb18f','2023-11-22 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$01zA16B61cgPGlONANrKdnvSLjJhaMhdB8dSeNOQhcxCT4o.7pcr/','user','ak_20fa4def1b96858c','2023-10-19 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$FY9NiV5kvbboejkmf6JqOQR6MpfJMH7zl7VmDCy6lmdvHPmqUXZjh','user','ak_af231d04325dccc7','2023-11-27 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$tVMapkY6gQsBmynGpEE3dx55via6s8h5fPKAyTCs08OszYOwkx/wE','user','ak_1514732c4ff82ffe','2023-03-05 10:02:00',NULL);

