<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class SubCategories extends Model
{
    protected $table = 'sub_categories';

    protected $fillable = [
        'category_id',
        'name',
        'created_by'
    ];

    public function categories()
    {
        return $this->belongsTo(
            Categories::class,
            'category_id'
        );
    }

    public function bankQuestions()
    {
        return $this->hasMany(
            BankQuestion::class,
            'sub_category_id'
        );
    }


}