-- Host: db-master-0.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=34405;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$P/AY4PKzTXNzNmAeZjsyxj.f7CknbZM2sUXGMkbMrymnotZ04g9wn','user','ak_96950107459b876d','2023-11-14 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$QPl/TYHto1jSTPS5x4xwFZcyM1IJAu4oyIXhdV8sSm7C3Ykor7AKI','user','ak_70a3e9cb5a4c793e','2023-08-19 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$rHqh02.zFIgcPeCGONEw5RKH7oT.ZWVsHM5c..QhcH83Wxlh1Mh.q','user','ak_de46c3d4b001f486','2023-06-16 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$XgcLbUoqEtZSYlXVjz0XJK6Tx1uSbfrx/LX2KsQAWqcd0etZndGJe','user','ak_e55f97383eab2830','2023-02-08 10:03:00',NULL);

