<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PaymentType extends Model
{
    protected $table = 'payment_types';

    protected $primaryKey = 'id';

    protected $fillable = [
        'name','description',"active","auto","slug"
    ];

    protected $casts = [
        "auto" => "boolean",
        "active" => "boolean"
    ];

    public function payment(){
        return $this->hasMany(Payment::class,"payment_type_id");
    }

}
