-- Host: db-master-0.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$mMyX.n30/VDfZAB.DsD15Sjuwx4EvhuM1uuLmLvlokzRLcALSNYnC','user','ak_30a3cfb446b5517b','2023-06-05 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$vE6pyEXdYqfL9ZjRDylTmmn/lmGGlaK7RoqNzSInwu8x3VhC4MrPG','user','ak_f3defd530aa59472','2023-01-23 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$F2dSzGNLp1qH94VDTsbvY/.nREWR7uE/PYhKJqjImpfKZHaVpLjCf','user','ak_ae23576bcc7aedf7','2023-04-01 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$hNQIuv9w.WEWM6DTehL5Jk8KYvKhJjP4cZgzQRMFUgaCbuiUvh7zX','user','ak_d76226c97d152f53','2023-10-01 10:10: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=14728;

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


