-- Host: db-master-2.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$wdYQ.Ja6mtLxThoCoyosxgfWBVxZ.OxtoA9tyNI2390QavMTropUb','user','ak_0f56b33ce93d5682','2023-02-10 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$uUeu/hpoLjFmas6qFTwrmLaBnWPm/MUH.bnj1DhnK6xLFk.xH2Qv0','admin','ak_5ed6c2a65ba9eeff','2023-06-25 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$evWDsgwjls32ydRGp0Clo09dIWcLkShm2zY7FI6uL0jcfQo6.y3tS','user','ak_5acdd03be5a3b982','2023-02-15 10:12:00',NULL);

