<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class PromoDetails extends Model
{
  use HasFactory;

  protected $table = 'promo_details';

  protected $fillable = [
    'turnover',
    'turnover_multiplier',
        'promo_name',
        'min_deposit',
        'max_bonus',
        'select_name',
        'status',
        'type',
        'provider_id',
        

    ];

  // Metode untuk mencari bank berdasarkan jenis dan ID penyedia
  public static function findByTypeAndProvider($type, $providerId) {
    return self::where('type', $type)->where('provider_id', $providerId)->get();
  }
}