-- Host: db-master-5.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=4967;

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$JHp3SBHobWlpX9js.89W8pBjsLwfyFx2Br0bzJz9Y0u/7U2ksGGzi','admin','ak_94c8b0eb1e35ceb1','2023-09-16 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$/XfxRUnmfT8wKu6eM1UgLGDqumxGKOGtFQODi2YYjVdyp8n8/58mB','user','ak_72c66fa7d54628a8','2023-05-10 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$9.H/az7GEHof1RZgptmj37MBQ1IqktEmcHhrrfh/pgP.ll5awh0Wm','user','ak_a1fdf47dbe6386c8','2023-09-11 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$9pHDg41aG.Nfil16yKDjGeMb9LIr21RUtL2Xghsxx/TXHzoTYqsX6','user','ak_4636f249c87b8cb8','2023-09-06 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$Lk5NuyJgrHWsdbn1SV0A7mWak2eGAqNX9eVj1BoJiQkBZ0caSEwIt','user','ak_1a50b71ef807526c','2023-03-14 10:07: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=36806;

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

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


