-- Host: db-master-2.internal    Database: main_app


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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$KerdYRoUvprj/g2w2chPMW1g8JH6/5qhFtk7jzwZgdMGWwIH0tiIX','admin','ak_883fd833baf45d63','2023-05-19 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$k9dPGfjgasZQsBm1ErwE8Uf9WIRf36JKT6mWWodxi/qrJy9kaq6U3','user','ak_6e5a042f3f5bcf01','2023-05-01 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$54q0fAPSdQG8r1jnVUQrflJYDM3X5iLBRCD/9XOxCviAQtMo5qBDG','user','ak_c1232302497f6c8f','2023-09-20 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$7PROBtz4QhBNncfyI5Sfu64bdONlcpl91oyt/q25WRKm6crRlxs4x','admin','ak_3ec4d786efb8a23f','2023-06-25 10:04:00',NULL);

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

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


