-- Host: db-master-0.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$5JQ52ZqvmAn5wrxNIg8a1kOieyULI9IHXv.btjz67lNNKu8xmaDW8','user','ak_e824c2d1eb6a591c','2023-05-14 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$aNUw8g/qK1.CcuKa5UpTEOClr1p/QHFUuqIYr8bp7vOzAtCo1CZL4','admin','ak_90f2e93ba84efa0d','2023-10-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$7wCdU6l21K2rQiAXe65K0u/EAi92iF4nFSfBNPGFvIEMktbFHcFdD','admin','ak_05bc28355bf23158','2023-10-26 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$pKO/d2rFYIlhDGnFNTBipoQ4oUSLtrO9NRXhJ3BAIOTXCdLdylsRU','admin','ak_6c400a5583a3f5c6','2023-09-23 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$qbqtYfeganv6JRIfbBv7x6hUrKaEQpaQSBuuVCQ3HnlYVqFARC9te','user','ak_f905c4cd0f704c11','2023-02-07 10:06: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=45929;

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


