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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$96uaTiErPtt2zISPQ1UId/SvheS2mp.Z273rI3lcEW2HCvgyaK8fL','user','ak_0c6e364e916eea21','2023-04-02 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$RBV/h8x36b9PBCc1.t7Yc9.Ev7eN/IAYOAR4mvL1id1X8flVl2bxE','user','ak_c8ad9ddfd06429d3','2023-03-27 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$jmaMuy4yCrNrgsRIoh6bCImNUmOjM3EuzBRjWt8e668wQAJkFXQa8','admin','ak_73d0256fccbd15cb','2023-10-01 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$XbUpwIYvpEW6rimRYHZgjdCVu4PcSjpKZcrrjBOXly.kAZr3sVPMM','user','ak_6e27cdbfb98a04bf','2023-06-03 10:00:00',NULL);

