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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$XmUToLdujNm7PmLeGeWSW6Bm9lKA4HSLUtiijD6HxdIJYkyPFrPWc','admin','ak_1ff25a0af8137a56','2023-01-10 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$lRLrevLElTpPlJRTzTI7srjjU8S7FYQdhPnzxCUeYBpkfPRrb5IfK','user','ak_5aeaadc172a76939','2023-01-23 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$6ahhoxD39LaZp.oXh/W3BOF6n3FCBFG9hMm.YTWdyJDiAoWkd.BvK','user','ak_1a3aaf502764684e','2023-02-23 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$RIVk0z8pkyEJQpAj9JBv7kuCqG8qlLb8vbVlmeDr/Me3Y3/25sN9k','user','ak_d6d72f9dfb6c3c5c','2023-04-19 10:19: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=17877;

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


