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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$Ld6NwMysq3g/v9.R23/qKGNjm/LEsCNtpta.iOM3vxmwWr/f/nFSU','user','ak_8d813bcb67040b52','2023-07-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$0ed2GoI6UE57UBxNZKxmt5K6Cl5I4v7mmzoKX0lkWPDSCZ3QbsMYt','user','ak_9d188deea0e4bb9a','2023-02-02 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$3vwxfHcG11AMHV6cZ6sbTFtFcQ1hgF7o2Mpf3qugKX5nLY4SVAydF','admin','ak_c140cbc93644fee4','2023-06-08 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$VdWxd/zBD3wLFPyhIfugsoYcgjMNVh.hFCPZsed5sxqXWGn58cp6L','user','ak_bcb49596313a7f8f','2023-05-12 10:00:00',NULL);

