-- Host: db-master-5.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=31561;

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$g7g/94jKqolq9CKerywNrygDyMagMeZ1rvhp5WfRGpoYQLwJK4xFU','user','ak_f22389b3b8a1dc09','2023-03-18 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$8m6797gaHtKJ0EV74x4B3/7rhwFuT/dCB3sfoq9yNWQkHa073JDZV','admin','ak_965400950a6879db','2023-06-19 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$0ICMKGLe9hGNtpPZu1ASi8.XCNLN6D4rxANoWdkh5UQE/ZjCKdqmM','user','ak_f664c94d96030d26','2023-07-25 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$G8TcjSvykl3sWvunHSNgWrXuJj8MwdouEMxPt37Doh0b6bGrWiMhR','user','ak_4a4ad711ec0463b2','2023-08-26 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$P9EZNYsBViRPF9WBJeoVpNsDc9MJumxrJrBUCFcU5qxhbfDN3wF0l','user','ak_616ce561fe9a41fd','2023-05-14 10:10: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=48382;

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

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


