-- Host: db-master-6.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=20685;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$2vKdLIJYvamMFh5BQABXJbwJQSsbWkG9FGkED5rZMJs7Rw08EoASb','user','ak_f7fc3db76fa5b842','2023-05-22 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$ma5NRwTk.jOeAS52JZPjE/cWggJKR0tYL8jX8cmGaSOL9pNjYtraq','user','ak_4d6fb3dc4a9a253f','2023-10-24 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$ml.gWiu2u8YxbT9FwO/SMYtzbE7RKo3510LOuakVC4tpi3K4wQu9f','user','ak_b76f499cae7e1039','2023-03-04 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$lKyhOrhq12WISjEqawWEBBJjYfCCxV9pOcDvTFAY7KaJRlaHA2mQ3','user','ak_16042ad61cd97888','2023-06-04 10:05: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=8990;

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


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

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


