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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$OBrX5C7QrzF0hQy6LgTs3BwPvcfXP2wQdkBCML8tMvBafiuq.yLOP','user','ak_94005a7c1c6e745a','2023-02-01 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$uHbRf.W.UfqBGCccj6dtum0AVjC3.q2sc1eaSw5cU3yIxlQfcf2gY','user','ak_f3cd0a0a398c3249','2023-11-07 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$YD066BaCT33opYWVFhp6gDXIBbu8CAkXhPbaMpmlLLfvTm.hBe35o','admin','ak_2cfeb44534030a42','2023-06-02 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$wibod27HnpGT9SNqcKfU7x6QU3qPZm9zCZJJjGwcHu7NZb6npSVLF','user','ak_419b6cd61ad83a73','2023-12-16 10:01:00',NULL);

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

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


