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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$ez9tMvjs2Ay6GPZ6lXYtMTG.hLI0ZyYkx4CRfOIWnjw0MGkIcES4F','admin','ak_998b0dbbc0667216','2023-07-16 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$4518M3S4veF9Kvn4NDoggdU4dgAY0rm5phDLBXPIDwgaR/ubkFT/0','user','ak_ec1ea29b54d1d051','2023-11-17 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$l1YNgXEYj7oEHHp2J7gBJTD/YbXaY.b/EgqOmlFa1BJIPHFu3nwtZ','admin','ak_80e6374bbed448f5','2023-02-09 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$sWzFw4tMNEeySGhRL/G0D4OdYRDqOeaJv/DH2dFyEpTSFNxzhps6N','admin','ak_ccc010656c2da82b','2023-02-28 10:06: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=10131;

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


