-- Host: db-master-4.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=31485;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$UPM42yICXBleQWhzxum/bt8wlNlcFiMmkezqoirPS10lzHFxcZnpZ','user','ak_cfd2a3d013a616c8','2023-09-17 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$oioakEVhVSHOaHcrXRwz1J/8kfd3aDMGbtBYBM1gAuWgkhFiBjzOo','user','ak_83659fb984d46830','2023-10-03 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$eQ6NXOiu1Q2u/1SEMUbHawD4EyVQAArw.a6fu.S0a.Oj1cAsQUvAi','user','ak_04385889e868d4e9','2023-11-14 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$tsBF6cAykTGpgdBmNRpiO2y9xTkf8eD7nu5HGWu7wF722mazDcFxm','user','ak_a7bdda6207e67468','2023-03-02 10:14:00',NULL);

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

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


