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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=30772;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$PsJPQNjBAjpLXTzyG1u2bNvj/uZqnWEkwFxSyM.o6Ggu2VZD46GB/','admin','ak_333158d9de8e71bf','2023-04-06 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$WNkH7u4oaeeIaDOIUW1GFbBSF9ktUUYMsWgdf5kfG.M.7MSu5Ia6r','user','ak_bb8662f144475f07','2023-07-14 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$NhQx4HjjK3f6BufwIYgO8nsycg5mfh/YeaPOKDdcCCjL5ltBJr5QU','user','ak_f08b227947861636','2023-11-16 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$uS4MCFNsKGH978gFCk4VU.rOPjWV/rrV0ONujkREBPeWLrI8JHdpr','admin','ak_8dbda1d595a57148','2023-09-11 10:17: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=27742;

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


