id(); $table->string('name', 120); // Admin içi tanımlayıcı isim $table->enum('type', ['video', 'banner'])->default('video'); $table->string('placement', 30)->default('preroll'); // preroll | home_mid | home_bottom $table->string('file_path')->nullable(); // Yüklenen dosya (storage/public) $table->text('external_url')->nullable(); // Dış URL (mp4 veya görsel) $table->text('click_url')->nullable(); // Tıklama hedefi $table->unsignedSmallInteger('skip_after')->default(5); // Video: kaç sn sonra geçilebilir $table->unsignedSmallInteger('weight')->default(10); // Rotasyon ağırlığı (yüksek = sık) $table->boolean('is_active')->default(true); $table->timestamp('starts_at')->nullable(); // Zamanlama (opsiyonel) $table->timestamp('ends_at')->nullable(); $table->unsignedBigInteger('impressions')->default(0); $table->unsignedBigInteger('clicks')->default(0); $table->timestamps(); $table->index(['type', 'is_active']); $table->index('placement'); }); } public function down(): void { Schema::dropIfExists('ads'); } };