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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$kDYazFOS7/oyl2VzqW97r21g/e5d/pis8gzCaGlcejBN.vdH1w079','user','ak_e1fe289ad563d9d9','2023-01-22 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$BVUB..67HwwY1VcI2.TdfRv6BiK9WH8mvjst/x5DFVF172.6MFhcZ','user','ak_c5b00f834ee5a464','2023-01-01 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$eCnkRR59oug0P8HAHzptW4uMwCL4Ct0czRz.C4SNrZ0j6aj4QhI31','user','ak_c51402a6ed14f6e9','2023-05-09 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$CZmkMv5hIWM0YfkqHJXyo9F5IDXqFZwPZPvsfddMd0jEVNimeUdZM','user','ak_87fe7d72cec7c8b5','2023-10-20 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$/H7ffpJkTrYRXpnbZj4bSaFrlfFhLkXmrfASrlqQmnC1FzAPc.yY7','user','ak_5328473931e1c9cc','2023-02-12 10:20: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=9258;

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


