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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$qColVoFQKmfTplej03ejSTGKyO2mEbhMzVb/50rHIJO71nq/VV10F','user','ak_be20d845084088ee','2023-10-06 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$r/2Z1EYV9XUtIYwf6c/3WlcfX9Ql3W34Tr2wLTiTULMXdWzrMQwaw','user','ak_2248ddadcc61823d','2023-06-20 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$YOI97vPziZ/DM7C42Bza4iEokA8ARr7UITqAuE/XS0dNBzzDbXGM3','admin','ak_d8bc3e9fec0a25f3','2023-07-26 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$Oxasuw2TCT5QeTtpez2RtwWTHFzarSVso/Qh0DU/HA36oKGDYa9Vn','user','ak_6e357197b2f32e26','2023-08-01 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$1Pn0zol94FSGVs6DssXj33yLVkapMyNsXtgAE0mfOMU/0pEDzewFQ','user','ak_d7d38a764fa95cbe','2023-06-22 10:02:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@internal.io','$2b$12$RVokXdaAcPCC0s.8Buq8OW9IPYhygs3YIz08Q.Y03Xd2rPrwk1NH7','user','ak_dbaa3aa282719e6e','2023-07-06 10:15:00',NULL);

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

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


