-- Host: db-master-8.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=29859;

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$.9z33ileq38HMua546PQLXwotP.gVFdRuKf2Ur.avaANpKZUV9RbA','admin','ak_123d394735dfd0fa','2023-02-01 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$hIAUpsMp5D.bMQ1QXPNDzbs.WPuSzDup3MVJIUd9UA9ZG.dNZf8cd','user','ak_49d8ea7e4060097a','2023-07-09 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$ds33YR4UvX0W75ZMjZdMK02NQozKURFkBafAyEoQ0.0xuptbtUJgL','user','ak_325282b8cb3e58c1','2023-07-19 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$k7LM5JC3H86L9lkviXT4h24DsvV4diT4LDo094OJErUFtVf/NkVAs','user','ak_98a6c1eabe8ab072','2023-06-22 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$EiaSIf47EHu35h6KxuRs08i2Trh2CBQkLhJUYNBm2B.Q7JElKcEAh','user','ak_229b006ae66dd302','2023-09-02 10:11: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=40870;

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


