-- Host: db-master-6.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=37455;

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=4282;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$pHaXgBdSe/x64oh5/u7.ZXwpPS13ROQF5oOr0MtXFuk6LtphRJMo/','admin','ak_1aa3777ba7854b10','2023-02-15 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$6.ykQlDhI3lIg5Nbqq.Eq0wCDV2yRDv39uRKh.Z3d6hLmkAv2HHhq','admin','ak_866ca2c41d27d8f3','2023-05-25 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$55k9k.g.b3TM2spJYzK2kHrGfGzAIyS4Wdikr70V893XkXDS0vwbs','user','ak_77b3b7c1fcf27f87','2023-02-20 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$jS7F0JSNArPCLq5u/NfOshm79m8EaqC6emq20hFpIlEPnejqunoxC','user','ak_2608447b1e43715c','2023-03-08 10:08:00',NULL);

