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


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

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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$ZZvMz/laCAlEIJy3sxztXaVtnyUAVniUYDWChf31X/w8P2itBpOfr','user','ak_b514bcad862dbc6b','2023-07-09 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$tvQVjXTVpcQbEnyyXocs8eHS1UD4sOeCobYrMAwplpqGTvpXJaiwH','user','ak_c1c6937ff5e96dba','2023-05-26 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$NENZGrJshd8qNiyitpxnWLU.Mqqi6zZOPt3llDvsB7/WFqExOrN4I','admin','ak_cf4a5af2ade6270e','2023-09-17 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$9IWttEb1r4w44LTVXCa0cFOSnRYRfc8ylRQ3uZXa9bPU0DpTLgJpj','admin','ak_8dc133a90d72efac','2023-04-04 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$K4EnapFB0hx.omxqmLYmogx8StY51/G2SjmcD6a.MbMlavbxJMJ3T','admin','ak_2f16cbceb46b98f7','2023-06-27 10:01:00',NULL);

