-- Host: db-master-4.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=18934;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$0RUsBWM5LNTCNSjYVX2Rl8wt4ldmH61/t51Yqgf9xxdFL1hVC9ext','user','ak_7b98efe717143a20','2023-09-22 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$wy3lY7sqdWG.YH/btlEkVqNx0S7f.CGsC38vz.uamwP1bTWC3L/AG','admin','ak_cf9cd0f2b566c321','2023-06-15 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$hl6WOT8lwuL7JqkxANFDsNYs2Civ4PcCifVL6ErDkFL9dWpKBaxKH','user','ak_2744f6c3f106fb5a','2023-10-09 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=37868;

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


