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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$AiXLvhLYaz4zTgTuDUODoqaHEv5PGK5pXGJBQ.6lE35472qEHQqrn','admin','ak_28166860312b2470','2023-03-12 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$ALsAQbIOLGdhoutWMDseB6fgZ2t.L3G0hn1oDAsYC0/2ZHPzdia6x','user','ak_178a7ce7dedb3e84','2023-10-24 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$62hn9fY39N/E.lnkM1yNefj0P6vhlX4gTCPTvx9kPnntNyYch8q3/','user','ak_2bd30dbd95de81aa','2023-04-12 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$/8zkRGxGqC.sroTK1r5ZJSA4LuLmu9VeCXRAp2cH0ZXqxct33vMg7','admin','ak_0ec4916bce8ad9f1','2023-09-15 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$HqAMuBf3XzvW3rmdOH9dlTkTXeT7ru79sFT1RiT11MRYH2X/uv2AW','user','ak_de154023a33df0d3','2023-06-10 10:21:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$JDhCwI0ZM52EPOdtXEFX39yVUsWr7x0DLVu3XypB2cRt9RrZOi12c','user','ak_bc54e3b68fb60b59','2023-05-12 10:06:00',NULL);

