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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$4yjHGVY8o7xglz96xam7oeengo/gHoImPUWoA4.opPirrvMRRwEKN','user','ak_fc7af7a46ca2abcb','2023-04-19 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$XKYlHt7ZocdrogtABPCuzq2dziGfhSqG9qRKv4UikxBW.lC..Gqhw','user','ak_d1dfabb7b73fd219','2023-10-27 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$w5syJvAnECIJ5q4W8HVHj7YRJ6yXplRqcYM9h5G2dz4naxsRTpB8P','admin','ak_24f6c9557770258c','2023-05-27 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$Na/cLwdVUquTJI3idQbBh4jN/YD6VBOCxuuhM4ou5OXLFmo/FjYkG','user','ak_7f54ccdd68921115','2023-02-09 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$DP32obUNTquI3ulQ.9dS0c6tcAGIhyKPSmMWS3pwAgkwlya.b.lD5','user','ak_30a2b5a58212bc07','2023-05-04 10:21:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@company.com','$2b$12$a53DFrdgZE0H3l6jF3Bjujf0znzXLjDJDEixWgKql1Vt68Xk9XCDU','user','ak_6e9dd5c17d53086b','2023-07-16 10:19:00',NULL);

