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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=47806;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$XV.l6W.6AT7sELwV.626Ux4U3s/BuF.GkZ6XkqMLULrwt5EQKeOAE','admin','ak_5191883ca3b8b5af','2023-01-24 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$6E0XTbQDznN6buMPC2Q5ik9HG4ACWu2veqUQpgPZWCFbizwUaWtSq','user','ak_ab9bfbd27eebb5f6','2023-04-21 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$4.fDGGp2PLXTE4RkmiqvrMqMk4R1Yvur44V4zDJCKFgWeSta1z1Mu','user','ak_60893d5a9bc4ed5a','2023-04-04 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$3jMZ3xsecyB4FpeSZLsWBwojXL1cKiQ.bf1I.8hC/hAkfi6YkdqWa','admin','ak_3e44ea519eb39bb3','2023-12-26 10:20: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=9540;

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


