<?php

namespace App\Models;

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

class Distribution_ouvrage extends Model
{
    /** @use HasFactory<\Database\Factories\DistributionOuvrageFactory> */
    use HasFactory;
    protected $fillable = [
        'personne_id',
        'ouvrage_id',
        'quantite',
        'motif',
        'status',
    ];

    public function ouvrage_livre()
    {
        return $this->belongsTo(Ouvrage_livre::class);
    }

    public function personne()
    {
        return $this->belongsTo(Personne::class);
    }
}