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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$drii003Uolk/dDIWRETMZboM7rK.LvWBBNPaFrDE0yJUJc0pU4gG6','user','ak_6dd32970b4d24440','2023-08-22 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$7y09wPrTLovNBOdAqwkqKPTBAwtMvBbxckaECTmKQgq6PQP5EGpwj','user','ak_584edadf7281f9a1','2023-08-18 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$wtNBDuq.DShDPoa.badUVdBjonQVtRbvnbCOGM0xf2xGLwbppamtI','user','ak_9fb23be60efa558d','2023-12-08 10:06:00',NULL);

