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


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$lskmh0ffBlphzXOzht8JhIeCuTdUk.AffbhchkD0WOS8Dgk617Cks','admin','ak_ac501fb5b1ccd6ae','2023-01-27 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$B1/zurbkJPtehrFLeVO83R7pOPJ0C2WSkQG3Z5Y0py9eGEXQHkudf','user','ak_4b9f396d94980cd4','2023-09-15 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$tFl/y66Zj69MrBSErpb4GtS7fKfnGjxTBx/zpRiKPcuQJgOJU8yr9','user','ak_3f06ae3f62629580','2023-03-04 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$7k0yxotIN1LkXY9b1A.8oeNXAmiADhasTQZuljik3xkgSa3.YtZuO','admin','ak_04df32b66965694e','2023-05-03 10:00:00',NULL);

