-- Host: db-master-2.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=21015;

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$Qdau5PRXGz80UdKA25XA2UsDTEesbCUw5jdD64cYV4GPLZwxBnM.n','user','ak_a6b2c5b2607241e5','2023-02-02 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$Mp1fggDxt0JnsM5fQlBC8YQddbPmbWBgoBf3bO4MkErxP3OFHf0l0','user','ak_3bd618df5fe412b5','2023-09-08 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$CqAeD.DMcnubElp6uChc93egCyLrg1D9lrWCoo2XKz3nK9J7uqIsf','admin','ak_4f68bd77106300c9','2023-07-12 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$2Oen7tkvgIDR6r/dnzriHnf8Ql7VWq2dAoxvqAQYGnuwN51YgTjBe','user','ak_a3e8f86ba3a01e9a','2023-04-20 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$vm7NZxWw6aBb0a6wRxFZQC/Y.tCPFeD.v3MllxIGdq.N392bEpJLD','admin','ak_2f50f25121d80f7b','2023-11-12 10:08:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$sybs7rV0N/VH8gXrSxlVCQxodHQRJCjp4vs0HFRjdb1pRHSDQPR6K','user','ak_6c9ca6c39eca6a53','2023-05-18 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=25429;

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


