<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ChequeFormat extends Model {
    // protected $guarded=['cheque_format_id '];
    // protected $primaryKey = 'cheque_format_id';
    // protected $casts=['is_default'=>'boolean','is_active'=>'boolean',
    //     'print_date'=>'boolean','print_payee'=>'boolean',
    //     'print_amount_num'=>'boolean','print_amount_words'=>'boolean','print_signature'=>'boolean'];
    // public function bank(){return $this->belongsTo(Bank::class);}
    // public function status(){return $this->belongsTo(ActionMaster::class);}



    use SoftDeletes;

    protected $table = 'cheque_formats';

    protected $primaryKey = 'cheque_format_id';

    protected $guarded = ['cheque_format_id'];

    protected $casts = [
        'is_default' => 'boolean',
        'is_active' => 'boolean',
        'print_date' => 'boolean',
        'print_payee' => 'boolean',
        'print_amount_num' => 'boolean',
        'print_amount_words' => 'boolean',
        'print_signature' => 'boolean',
    ];


    public function bank()
    {
        return $this->belongsTo(Bank::class, 'Bank_Id', 'Bank_Id');
    }

public function actionStatus()
{
    return $this->belongsTo(ActionMaster::class, 'status', 'Act_Id');
}


}

