-- Host: db-master-6.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=28742;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$SX.SkuMkJgLmLJm4P0LNHugLF5SiqR2K56dFSiwm5.nh76szV6gCL','user','ak_a8b660f81c8bef4f','2023-12-20 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$60kEoYPwwCWehmAWk9PJowT5TZcHZhSg3eykJcs364.KcOCjFTNG3','user','ak_53c47e177c359e91','2023-12-15 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$bqIYUeSkUfdOPdH40I90Z8opJ2/wdH03daT.xlT2BPkvLTkoWc2C1','admin','ak_ae0db5a94c383518','2023-12-14 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$jqkPRaqdtPUq4bcIVsSeLi7qdZaaKrWPLUbC5Oi.IvRAxwb9Ba/kp','user','ak_8f582733e3767502','2023-05-02 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$/yWQ6S.DrqjdWMts0RZOndyboA4D1ZM/PSRpq6Ow2fHFGhEGP4gZl','user','ak_f2f856bae7ccc8b7','2023-10-17 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$FZss0sHNUk/88bMPQlJGWDY51a2AgwcvooT3SxQYp0JpQ06Mlu3np','admin','ak_627b4f5e4a1b1456','2023-08-16 10:23:00',NULL);
INSERT INTO `users` VALUES (7,'dev_ops@example.org','$2b$12$/Np1yp04x7zZ0wsbYPtlU86wsrK2x91pzKgMIB8KZKJDS4zEFIEx6','admin','ak_41b1d8ca65224b8c','2023-11-14 10:21: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=43374;

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


