-- Host: db-master-4.internal    Database: production_db


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$gNi84z8reLjWCoTD7dF5x/LN4Zq7w6p/gcgmibuI4AcxK/xirFUfH','user','ak_c6b9202fe9445ab7','2023-01-07 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$zKLlsUuMVtSDkVyXlS2MXUbuqvXGuwnF5tNT1ofhhX38lWK2DsP8o','user','ak_cbf4230541fefc6a','2023-09-07 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$bY4Hpnlu2/Emo8M82.7qyE71rj//LMmgtWbZC9Z3/eexzH6Mq8xjo','user','ak_de6842b5092b5c6b','2023-02-08 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$fjvwCL.vGjubkhsUrQSdbxyDyp2wPqigteWtfwBsLd7LnnuNkoAwj','user','ak_4c42e43db30c4530','2023-04-28 10:02: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=45477;

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


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

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


