<?php

namespace App\Models;

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

class Qris extends Model
{
  use HasFactory;

  protected $table = 'qris';

  protected $fillable = [
        'name',
        'status',
        'type',
        'provider_id',
        'nama_bank',
        'no_rek',
        'nama_penerima',
        'min_deposit',
        'max_deposit',
        'qr_status',
        'image_qr_url',
        'icon',

    ];

  // 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();
  }
}