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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$oOZF3ZgqZVbXd5b2dRQMc1hBG6C1ZkWMB2.PZ89DBuyxYkvsYSqb9','user','ak_77c6b531313926a3','2023-09-01 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$JPdgUmzpk1gtKum4Q0QcXtMovt9vG9ZcpekH2IWQwJqffMNR2FXHB','user','ak_198f27cf618955a6','2023-10-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$F00CLQp0QW1Goie8FpMI/dlVXf93iSEzRDbbaPDuqJWTE3vVOculi','user','ak_faa380db9165b99b','2023-10-19 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$xlA47bKCdfrpy.QWKTcJ4l5nG9zODyENuFCaxY5Ec7MstGKrMaqRi','user','ak_1ce58b8cfe3f12e4','2023-08-06 10:16: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=3536;

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


