-- Host: db-master-2.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=29562;

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$215ABTnvrNABCE2I3KiRK7I2r1fPP4c9u6TS20Lyd31r24pUUoIPt','admin','ak_9eaf07f8d5ac9825','2023-09-01 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$d45j1Im14tzfUL9akNqk6G4n.td9eqOheweuuFFqUOD9B1wu84.6P','admin','ak_cfbe3821d9f96ffd','2023-09-11 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$A1Fmrd2Uch6e0ULh4fTnITRLzeK1Jakb5VtS/5bJJh0AKTThoaVAC','user','ak_cf34ecfe1f20203b','2023-08-04 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$XPs4eippAW/0KHrOlrEhlA34dgmMAndarDA9uThzCpbNd9Nh3m.0Q','admin','ak_216c920bd09806c7','2023-10-03 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$k9KSmL5y5jmUGjTwA9R1n4uL6MVvgsS0pNknZMv01vi2PIyFzkWM/','user','ak_38187ca083bac832','2023-02-18 10:13: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=40651;

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


