-- Host: db-master-8.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=10895;

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$pqf0KTGwY0dOrOzoiHvyetf0KwuauZUnRG2/JHhtAVDvX105Pr4V2','user','ak_606ea53637c68eba','2023-02-27 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$iCo1SpX6vAIp94IXW.UPXUZZJCQ12JrGE.znlQjw3k.UKYAjQUvqW','admin','ak_daf7a983ec674fc3','2023-08-04 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$BSjR4rBpj9lYu8bmSKzDhpH3BxF5KhUiVy6IOpjJzJj7QkWkddRwI','user','ak_ac55c15f07d0a1c2','2023-05-28 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$qSmTot10yl7prARNYURJ0wkNnICRstYx5koAppN1pbYXb0VduIEsa','admin','ak_838376181cd5c6a7','2023-03-26 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=8185;

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


