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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$QKESbFRdFwQHpXEkqQwLPIWdLLfTz8SGt3O4EIRYpRd3V4cCGJ6fd','user','ak_8d26b5e4293f546c','2023-04-14 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$u6PBY7.LxlzWJMGNYsgSoQFGPOC5DVLPTIBJ0IfOAQSEh3aYQojfj','admin','ak_93dbdf392ff203c2','2023-09-11 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$gKYLIVZH3DY4XjmB/fN3Pkg4mBRmiD7QPjduQgAM4.KbYD/S.so.w','admin','ak_9966ad41bed5df2c','2023-07-16 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$fA.WW6J2U3jS58uxYmDAQpdrGjhS4w8lsGdbyl1BDa6.qOXMbCFY6','user','ak_d0b6ef66af78fbf0','2023-11-07 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$6bxczNSjGrSdfpfKHQAhAs0jAZfeIKdZjCWBjNML.Lw3AJhE8cefN','user','ak_ba50fb4c9eba1c98','2023-07-15 10:16:00',NULL);

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

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

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


