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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$mnB5RVwLLadyjGyVXLvqqVaWip2uqMFWBZFc2FK0mYmdUIyTO7KTX','user','ak_75925257ec454d10','2023-06-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$7K8ev3dwX8nvL6t8yMFqmwLdRX85BIU4WD6R3oHDNEB1esq/pFqER','admin','ak_72874ecc295b9e3c','2023-12-24 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$dzqBYnRNvhNvAcODuT5QcTk6ELt0BtPz4DNi6UcVd74u9HsUQkP2C','user','ak_e2f7eee1a0cb737f','2023-10-21 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$RUu.IgDgwUi4s9CgIUIy0lHVxpdqUTwKzbKaEvkHIl4DpSAnsjO9/','user','ak_1ef8b261c36bf7a8','2023-03-20 10:03: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=15065;

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


