<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Railwayprogramme extends Model
{
    protected $table = 'tbl_railway_programme';
    protected $primaryKey = 'id';

    function divisions()
    {
        return $this->hasone('App\Abbreviation','f_abbr','division');
    }

    function consignors()
    {
        return $this->hasone('App\Abbreviation','f_abbr','consignor');
    }

    function consignees()
    {
        return $this->hasone('App\Abbreviation','f_abbr','consignee');
    }

    function load_stns()
    {
        return $this->hasone('App\Abbreviation','f_abbr','load_stn');
    }

    function unload_stns()
    {
        return $this->hasone('App\Abbreviation','f_abbr','unload_stn');
    }

}
