-- Host: db-master-5.internal    Database: production_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=47333;

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$WCdqzMCQyPgE9aoh1ddonCZ.Eep8YBgADbplvnkqgbgn71Mv4dwMo','user','ak_27f7a790066fdafa','2023-05-22 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$bGbIuysHt5ld1cYUekY0WZAIt7r9WENugstLrteFh0bA.nHlpX4LQ','user','ak_428327a9a8ad514d','2023-07-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$hiWgIruDJXx79j4jBunuBjbrczFW0bCxxwxH0Y3xNpKlGAJ4EHsrG','user','ak_2039ec56986f9b1c','2023-03-12 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$GZPHPbWY8gDljvEcmUF3xITtq2YHuk6hX7q34xJu8patzEDehWIi7','user','ak_f58fdc4599a9fa6f','2023-09-06 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$/k26Z.FFl8HIM.2n.hhe.y27hsZysXS5Isv6f4OPfI70U0qwtNtRW','user','ak_cf9c4b4f8c3e7385','2023-06-02 10:05: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=17356;

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


