<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class BusRoute extends Model
{
    use HasFactory;

    protected $fillable = [
        'transport_company_id', 'origin', 'destination', 'price', 
        'bus_type', 'total_seats'
    ];

    public function company()
    {
        return $this->belongsTo(TransportCompany::class, 'transport_company_id');
    }

    public function schedules()
    {
        return $this->hasMany(BusSchedule::class);
    }
}
