-- Host: db-master-3.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=10713;

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$PszzN07qag.Y3r.rKvFMr1KozlWke8Dw8.Ydhal/NuWPdg59IBsbU','user','ak_fab3fd7a44d3f6de','2023-06-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$lcxDsXv8J/F.bykezQXl1tHHL3CR7jnMy4PfDc7n0vjoqYpk5j24.','user','ak_962ebcb0678cef9e','2023-06-04 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$cRQ0lg9AB5xPhXud0GfnQsRDhWVYiAlCp7GF91xemBQeZU.WwoR3K','user','ak_b470b66e72aa49a8','2023-12-27 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$MtbYwpkpk/teYWDoOZJhco5pcYhefRZvkKiZa7gs3ZHluLYqIBTfN','admin','ak_cc19dc356fd4842c','2023-08-18 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$O9oRf2T.CZdnM/aiXeJTdh0m4nJx/55TA4QuqUYhNJgF.arzjwC0.','user','ak_bfdadc7a068aaf21','2023-08-26 10:04:00',NULL);

