<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Tapal_view extends Model
{
    //

    protected $fillable = ['tapal_no','tapal_description','received_from','received_date','mode_of_receipt','priority','confidential','has_valuables','subject_group_id','subject_id','keywords','updated_by'];
    protected $table='tapal';

function subject()
    {
    	return $this->belongsTo('\App\Subject','subject_id');
    }

function subject_group()
    {
    	return $this->belongsTo('\App\Subject_Group','subject_group_id');
    }

function documents()
    {
    	return $this->hasMany('\App\Documents','tapal_id');
    }


    function department()
    {
    	return $this->belongsTo('\App\Department','department_id');
    }

function section()
    {
    	return $this->belongsTo('\App\Section','section_id');
    }

    function seat()
    {
    	return $this->belongsTo('\App\Seat','seat_id');
    }

}
