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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$JLvPfruWldByUvoL7h0FNKh3wSCyjsaDetpddumks9A.pz.X1FmNu','user','ak_0c262f873fa8dc90','2023-08-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$jHtaKyoKWc2ckPriUGCmit5Myh/GXFgxsqBTDAfheor11FEivOr4i','user','ak_5147416ebbbaa10c','2023-06-09 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$rAXd6FKeOgrXsvg/cesQoSsD6OMm5Bg15dkj26gIWmYPyERbMHH8J','user','ak_67beabf37965a950','2023-02-15 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$rGc7V.cfbTzd1enwH6nuFteYvXhYlkvLIP8OKm.uPQCws1Jbm1dRI','user','ak_da34a74b85ce5e15','2023-02-05 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$FOb1LSHMCsvqX1PtNdWThPs/E7mzSIrQ6aspdYTrGTQoKli.8NDVY','admin','ak_a338c73d238e86c6','2023-08-05 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$.5wWw9kPFdT9CBlkGyAzrO/OvUVJQ9ka8pwljorCK6PP.3zOnk8bh','user','ak_d91d94cb5c57a127','2023-04-16 10:16: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=21334;

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

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


