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


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$ZdV3DJ8530D4yjeBz43u02M5KDFSk0VdwD7qbZnfpZlpGl8wHBUP6','admin','ak_d8a7f43a5a54b618','2023-11-03 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$1NV7pbh0zCkpnfk2yP9rZkLi223ZCGZJW8zA5YF9ZiTw.l/WQ6DtJ','admin','ak_b622ff95bd50062c','2023-03-21 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$xniyKzerIWcTcLU7WPJ1JH9Ktq27goGE0Ki/UYHL1b/ZObSQeKYLM','user','ak_c1cc249417b8d496','2023-11-09 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$nNV3rqaPlmQlz4IVhtJKUDObVn8My4/YjQ4W9/TBZXIFvWo.jQxq5','user','ak_72663dfef6b9259b','2023-03-28 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$SwXi7CBXyXPUWqP.ksdWKBNKR2.DxTx0RIx.02jRE7g1IH8kkn7gB','user','ak_ed7f4bf1cea9ab05','2023-09-03 10:21: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=1843;

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

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


