<?php

namespace App\Models;

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

class ProductionLine extends Model
{
    protected $fillable = [
        'zone_id',
        'name',
        'capacity',
        'status',
    ];

    public function zone(): BelongsTo
    {
        return $this->belongsTo(FactoryZone::class, 'zone_id');
    }

    public function machines(): HasMany
    {
        return $this->hasMany(Machine::class);
    }
}
