feat: infrastructure assets management with warranty tracking and EAN lookup integration

This commit is contained in:
jeremy bayse
2026-04-09 21:51:43 +02:00
parent 3544c77bd1
commit b28c56c94c
46 changed files with 2961 additions and 414 deletions

View File

@@ -14,7 +14,7 @@ class Commande extends Model
use SoftDeletes;
protected $fillable = [
'numero_commande', 'service_id', 'fournisseur_id', 'user_id',
'numero_commande', 'service_id', 'fournisseur_id', 'user_id', 'commune_id',
'validateur_id', 'acheteur_id', 'objet', 'description', 'justification',
'statut', 'priorite', 'reference_fournisseur', 'imputation_budgetaire',
'montant_ht', 'montant_ttc',
@@ -98,11 +98,21 @@ class Commande extends Model
return $this->belongsTo(User::class, 'user_id');
}
public function commune(): BelongsTo
{
return $this->belongsTo(Commune::class);
}
public function validateur(): BelongsTo
{
return $this->belongsTo(User::class, 'validateur_id');
}
public function assets(): HasMany
{
return $this->hasMany(Asset::class);
}
public function acheteur(): BelongsTo
{
return $this->belongsTo(User::class, 'acheteur_id');