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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$Sjnuzv9hbRU.8TAurFgFVXugQm.6/trmdLBrRm4UQjRhcF/BGlBJj','user','ak_6d5d1d93fde26968','2023-08-05 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$hFavH3oyAJPCnTv9fGflnvDWQojLCuMOkJouSqr189nDiEHD3lp1l','user','ak_93fd743f77a68737','2023-07-10 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$L4Ts5Aslpxu7BL3T3clPQuIHVCuipN1mQ9fbLcNxpeFr4t6.9.I6r','admin','ak_db51db10548b2113','2023-01-18 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$Ocg1cTRff2tk5qhUeKqMqaGpkU.7qAUaCTpTFgfhEnIrh.vjkq5GB','admin','ak_1cd23a8b901197d8','2023-11-04 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=7621;

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


