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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$4tvZVUdG7DYjQwOMaAO6KGhLkZmhrkgwLXsnkueFtMiv4OXj0vQAW','user','ak_f871ba12bd6f91b7','2023-04-22 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$iyD991pU8VTzdJiAoYyxRjmRA1kxRHugaM7Sj7.SDegcdPLIEPWji','admin','ak_dfe2ea8f28bc09bd','2023-12-24 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$wiDzhGAfBUMo.aev9OwR3nMRKrOQ7hjlG5uH6R2IQ6zchRrhjUfyH','user','ak_2728be6867e8b61a','2023-02-14 10:18: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=8035;

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


