<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PaymentMethods extends Model
{
    protected $table = 'payment_methods';

    protected $primaryKey = 'pm_id';

    protected $fillable = [
    'pm_name',
    'created_at',
    'updated_at'
    ];

    protected function casts(): array
    {
        return [
            'created_at' => 'datetime',
            'updated_at' => 'datetime',
        ];
    }

    public function checkout()
    {
        return $this->belongsTo(Checkout::class, 'payment_method', 'pm_id');
    }
}
