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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$y.wz05DRmWezjzEOMuIH3.LJhZKXzdPS2atxvet3C/f99k/XWglBh','user','ak_972f65fbb31d274a','2023-07-11 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$RW6QBAgPnAat5h6pt3M.CMHmFHfcIV4AAgI1YEzVpjSL0Pn6MEuqB','user','ak_e1ea62d6aee73c4f','2023-11-15 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$UDdiQso7s2X0L.82PkGRaCtIX3JWtWLg3cKUgS7zQfBnx9dyuFJan','user','ak_cc860deb16808660','2023-05-20 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$0AzWLbJ.8.ezsSMvOJNBy30zHVhL97NdH2H3Oqjd84gQi1q196Tc9','user','ak_88fdeca08aa15a37','2023-02-25 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$SF5m1bL2vtHCAG1i4wA/IRllnEBYu5Gn2bVPDiYStu8sRGlOHE/bH','user','ak_423978e3c7320ad0','2023-04-04 10:11: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=23331;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=39167;

--
-- Dumping data for table `orders`
--


