<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class CabinClass extends Model {

    public $table = 'cabin_class';
    public $primaryKey = 'id';

    protected $fillable = [
        'name',
        'company_id'
    ];

    public function company(): belongsTo {
        return $this->belongsTo(Company::class);
    }

    public function products(): hasMany {
        return $this->hasMany(Product::class);
    }
}
