feat: infrastructure assets management with warranty tracking and EAN lookup integration
This commit is contained in:
21
app/Models/Commune.php
Normal file
21
app/Models/Commune.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Commune extends Model
|
||||
{
|
||||
protected $fillable = ['nom', 'code_postal'];
|
||||
|
||||
public function commandes(): HasMany
|
||||
{
|
||||
return $this->hasMany(Commande::class);
|
||||
}
|
||||
|
||||
public function contrats(): HasMany
|
||||
{
|
||||
return $this->hasMany(Contrat::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user