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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$HfdpsErGaemZU33YD4Y9TANqAz0ccZiM.pxmWS7JZVMj5wP0Tnu5I','user','ak_e53d91f10cdee30c','2023-03-07 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$OSzwE8Pb9TYuf8iZWh3p/GliyphntWSQz7rb5PpfzwmcW1M7nxuvJ','user','ak_b52f816d810f75c8','2023-05-25 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$3K8ngOVDCCyNHbrhHsmcU/C3GE9MEuVDZRHlWJI4Ri21/a3phpVRr','admin','ak_bd4684f999f2cb69','2023-01-21 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$IXUCaUPkNV533CfinpecDRerUDDpGayyHJl76QUM99AMwx2NxOm06','user','ak_2699d83cdece6378','2023-11-28 10:12: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=8270;

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


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

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


