-- Host: db-master-6.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$k/4Sd4tL7gLSPTvfs65d9Gd1CeMUr5U8LHgSkXYWqIloMWWq1s/KL','user','ak_3e0ed8aac76f66c6','2023-08-24 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$jeK79UzWkpBuIpBrgPOAtyrL8qcB1N6sRi.uiFIVtMiMEMtgJc2vQ','user','ak_4bd9734b33333e08','2023-02-27 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$DQp59egX523p5VoMuLWVN0LdLeKTrNH2RDuOwzrVmE3L8RGez/L99','user','ak_c2177adcc98b3860','2023-03-09 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$HSB6QaaSpuYlub1gC.GIL3ke52tlvCU0/VUCTRoNYID1Ps27QVIZE','user','ak_009f2373de509883','2023-05-22 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$IMSZHR1mrrjK4Q9GDePCVmNHP.pEVyQbdGKIw7hyLD5fJe8WQ2TOB','user','ak_bfaf99e81833f905','2023-06-12 10:07: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=25489;

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


