-- Host: db-master-5.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=34234;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$BoTdRlJP3cuCVhbl40fKBH1BkQOHvm0QfgP81G1PcRGjVqjHFOsef','admin','ak_418ad1550bd7cab3','2023-04-01 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$PbVxW8abqx9Vr9YDCHrYHE.d1ihXc5y587fbHnGkU2F3lci37b.lJ','admin','ak_b07a44e6841931c5','2023-09-19 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$0LyBIthhDzWD9eucb11YS6lrbehSbMafUvFpUk97veBVoKTDh1iek','user','ak_0bc786c01221de78','2023-11-02 10:17:00',NULL);

