-- Host: db-master-3.internal    Database: main_app


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$8fT/Srpg3oPQyecZr7CRnEK.VM97Xaz15XmiFlg.v6PU3dSJ8/.hu','user','ak_2ed485790b8b8645','2023-08-22 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$sHkWpGOVzBL4NltE3sXLdS1lxeahLPtkrRBpseBF8VErWZQO1nQDa','admin','ak_04cf86001c805137','2023-05-04 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$sjXw4MvbibdTiA3af14ZJ82XhrQRuVCKeopqi9OUeMcOmsM9VoYRL','admin','ak_bb71917ddd043050','2023-05-27 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$4NSv.JjEiW8ZsbhtNFUnpdlgDJQ6.tEdhKAQcuLuCq5ZmeB7.hCbh','user','ak_229ebfc1665d5b79','2023-03-04 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$Y9uRaOQNvsUu/VWgA1V6bw6LHTBjw.K7xP6N0g1Rk.a89ieQ.50n9','user','ak_1fc35cd345073f13','2023-12-24 10:23:00',NULL);

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

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

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


