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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$JXMTGILxjss7yi1dYvn4KtMSU/LNYv9TdTugeFAjEoPjGlvsgwD3j','admin','ak_bb40e35cb00e2387','2023-07-07 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$XmNtd/50dYNygzj.YiMMiIbTKf6WU9u5yL97V3L3Awrztf8tik2IN','user','ak_97a2cd79e306d129','2023-03-28 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$BS.cZnZfGI92Eg2jVS2eTGpskwCTSJPmW463lQlIP90eIOLEob5Oj','user','ak_d2d5fd63014c1aeb','2023-05-15 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$bxoGNV6Bkn48YuWKEfuQPLOmLNGfBzPLoUby7sYOBxQBCmh8mCuIV','user','ak_0b987bdeb7542119','2023-01-14 10:08:00',NULL);

