feat: infrastructure assets management with warranty tracking and EAN lookup integration
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user