<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class Atelier extends Model
{
    protected $table      = 'ateliers';
    protected $connection = 'default';
    public $timestamps    = false;
    protected $fillable   = ['nom', 'email', 'telephone', 'adresse', 'est_mko_interne', 'actif', 'notes', 'contact_id'];

    public function users()   { return $this->hasMany(User::class, 'atelier_id'); }
    public function lots()    { return $this->hasMany(Lot::class, 'atelier_id'); }
    public function stocks()  { return $this->hasMany(Stock::class, 'atelier_id'); }
}
