<?php

namespace App\Models\Hotel;

use Illuminate\Database\Eloquent\Model;

class Status extends Model
{
  //* Associated Table & Primary Key
    protected $table = 'statuses';
    protected $primaryKey = 'id';

  //* Fillable Fields
    protected $fillable = [
        'status_name',
        'status_type',
    ];

  //* Relationships
    public function reservations() {
        return $this->hasMany(Reservation::class);
    }

    public function externalReservations() {
        return $this->hasMany(\App\Models\Modules\OtaConnections\ExternalReservation::class, "global_status_id");
    }
}
