<?php

namespace App\Models;

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

class BilPelbagaiApi extends Model
{
    use HasFactory;
    
    protected $fillable = [
        'user_id',
        'lesen_penjaja_id',
        'tag',
        'status',
        'return_param',
        'data_dihantar',
        'url_dihantar',
        'no_akaun_bil',
    ];

    protected $casts = [
        'return_param' => 'array',
        'status' => 'boolean',
        'data_dihantar' => 'array',
    ];



    public function lesen_penjaja(){
        return $this->belongsTo(LesenPenjaja::class);
    }

    public function bil_pelbagai(){
        return $this->hasOne(BilPelbagai::class);
    }
}
