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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$iz38p/j0cd1vtaRL7NhWdnQHzIBEq6k6aEuehs3vjSTAZBMp47kDv','user','ak_d75586bfee777006','2023-06-10 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$uN4EAXvLEbFgKbQxaHFtAw9eQ3.BllKowwzdfDntSrxkxXj4Svu4y','admin','ak_539e6b95c26601c0','2023-04-18 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$w4tLPMxbt5SbLDK6Ff1UpgqVJIwCOasWpV1OfZtNJEMMHx8FM5Kmq','admin','ak_a00c2e728a0220bc','2023-08-10 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$aowBovBL.9xEeQiF6lsvFlUc8yhCJK/EP2gmblwR1Vs8YtCT.7Osj','user','ak_9749477002d3addc','2023-05-10 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=18493;

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


