-- Host: db-master-8.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=45542;

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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$..FrzyYgav1XKIxPpkca43mQ3.0XAqcJPkoeAFzl0F6ZqjflgmOJm','user','ak_095afda0ca43fa0f','2023-11-09 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$m7oP4eWSC1cA8vsTmyvIX6I..S9/YiOKn2B/GxwPBhC0mzUY9COAj','user','ak_083a87a5d382b5a9','2023-12-15 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$c28cqjf971FtHQ6JqdWfEw9HpLo8dWPLT1OMXbET0xqfxyQjb.CWP','admin','ak_523b0c4be34235b2','2023-04-23 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$Hsp6AlOFWilMMbJkBT2lfBYsLMcrUhsP99ieAWOsamvAgBuoKTEht','user','ak_a1f73f63aefb5660','2023-11-26 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$Twb3qIRw5lQAP/WVqCmuk2bug7rQZdnvKmIc1qY.uPzhNsMs26r47','user','ak_85bf40efb4d162b9','2023-03-04 10:05:00',NULL);

