<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Station extends Model
{
    protected $fillable=['name', 'code', 'station_type_id','sequence','parent_id'];

    public function type(){
        return $this->belongsTo(StationType::class,'station_type_id');
    }
    public function parent(){
        return $this->belongsTo(Station::class,'parent_id','id');
    }
}
