-- Host: db-master-4.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=39159;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$iQMktjfyK0Wlq9KNk3LMPW8GDwa08JiKEb7.C7DrMnf46JGF3ih6z','user','ak_3b1d40a728c11464','2023-09-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$a7jtohVzQD0QL0Ly7IyU1qauk6Xxrpu3cV6SugDAy8CE55OQe/j.m','admin','ak_7791f6f1b869c620','2023-03-09 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$de4z0CbQ/cxKScMF3DRRETZ1jFq.iI5jpDM2Am9UrjoByBP6iGLYb','admin','ak_69547e8268b98d6b','2023-02-27 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$C3FrewduJ3jMVWvjlpR3xzYZO05H4HxkASAtpX/C8wvk3uNscOdvL','user','ak_6f7e4a155ea3113e','2023-07-27 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$5EEASJb.FDMJ.hor./hixZdfG2r16bjVXNfuI1XacVbActuq0uxj3','admin','ak_5840ce6502902269','2023-11-21 10:11: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=1114;

--
-- Dumping data for table `audit_log`
--


