<?php

namespace App\Models;

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

class Delivery extends Model
{
    use HasFactory;

    protected $fillable = [
        'access_log_id',
        'company',
        'recipient_name',
        'delivery_point',
    ];

    public function accessLog(): BelongsTo
    {
        return $this->belongsTo(AccessLog::class);
    }

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