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


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$IPYImuaDDF1c1IY7xrgMPN5k4XPSXdmm7p1WdGKwJA8RCYKfKfSTX','user','ak_2b8d6e9cacff28b4','2023-12-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$GB8.ry9RomAhTE/3gzTXHAMZfC5yxo79fYLVjmLjmyEOTzyagPztu','user','ak_ff4c47a7248adc8f','2023-09-04 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$xntu4ig.Kwpjv9koaMTUn6m6l2fiYx2YxCtq/9ogTY6epRMST4f9F','admin','ak_aecf601334693242','2023-03-13 10:10:00',NULL);

