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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$qhyoe0QkuWKqa0nCVsGKl9ySiPi4ipIBB2mZZduie16P8SYHbFWxC','user','ak_eb81143ea760706d','2023-02-26 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$DU2/cIMiO0nx1U2zw/csl/10SvdULLQJ.i/FdnAqx/47A7.xzAk/s','user','ak_d368f4c6de7d4e54','2023-10-23 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$re2g4iJLDQcMnEQ8ydHnNBPCHhAC2fmwESaJMYa9wHK/VSeG8Oygv','admin','ak_342b37434ecba85d','2023-06-04 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$.uquClo2xxYVV8KJ4NXh8gGDzkEyUfTyABozN.B/RcpnS.oYmJPBu','admin','ak_6c46dd2dc177e150','2023-12-13 10:04:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=7880;

--
-- Dumping data for table `sessions`
--


