-- Yatırım sıfırlama ayarları tablosu
CREATE TABLE IF NOT EXISTS `investment_reset_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `auto_reset_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `auto_reset_days` int(11) NOT NULL DEFAULT 30,
  `last_reset_date` datetime DEFAULT NULL,
  `next_reset_date` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Varsayılan ayarları ekle
INSERT INTO `investment_reset_settings` (`auto_reset_enabled`, `auto_reset_days`) VALUES (0, 30); 