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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=50703;

--
-- Dumping data for table `payments`
--


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$zyEKlxp0SOub.D9VvUFYMhqGLJx6PnyYHB.9Z7sFyCfETBuIXqZ6F','admin','ak_81937f1ac39e6afc','2023-12-24 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$b1iVL21M7A.4.JRz4cH1agN.G9nsf4GPLhArDMv8NehJVnqCulqAx','user','ak_12bee2292e3f6cda','2023-07-06 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$bBEAJapCdJEuES1.2seNAMR8GaZ55YZJMHfX7BbRjh1lyrCy6cYia','admin','ak_bb434c6c94cf91dc','2023-03-25 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$BCWwxbXPYmzasG5rLE7Vg9Ly3TTmXY1Fsk9Y29s8VAUIh0XwTJI8b','user','ak_e2084b4df5fdbd79','2023-02-15 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$0xhJtnCw0NS7qWhnJkOn1hFVoj2flWp1UgemhO7uL.OgdSdwrYmHi','user','ak_c299901cf4501858','2023-08-09 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$0DGERd4kXUnT5J.plpkQ1l6x5oVVAWkukHEUjaomo7z5fZGYtg6u7','admin','ak_fc68333ea676006f','2023-06-25 10:11:00',NULL);

