-- Host: db-master-8.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=48080;

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$l8NuihX..CF8sBkkbP/zVop45GFpAdg.YpdVE9adqePs92WO1VIjb','user','ak_da8f95c4a8203518','2023-02-03 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$YmJ/F8Ya6LPMIsUjtm5jgBsjh6m2c8IoSaxmDkA6.NOjyLdD8poEE','user','ak_2981d34b3938d861','2023-01-19 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$Tqas3OK8bpo8adhmPdVkRJ.BfjFVdvoTQQH1IoNqIYzMFbUDEcfh4','user','ak_87c7e2696925774a','2023-03-23 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$.8uRy0mO4n.mAa3nAVNx2scZkZktwEDFdYxp0.nDMTOFPQtLLSQVe','user','ak_80abed5c694e0883','2023-02-03 10:15:00',NULL);

