feat: initialisation complète du projet CESIZen
- Backend Laravel 11 (API REST, JWT auth, PostgreSQL) - Frontend Next.js 14 (React, TypeScript, Tailwind CSS) - Docker Compose (PostgreSQL, backend, frontend) - Modules : auth, profil, tracker émotions, informations, admin
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Tracker extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'trackers';
|
||||
|
||||
protected $fillable = [
|
||||
'utilisateur_id',
|
||||
'nom',
|
||||
];
|
||||
|
||||
// ──── Relations ────
|
||||
|
||||
public function utilisateur(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Utilisateur::class);
|
||||
}
|
||||
|
||||
public function saisies(): HasMany
|
||||
{
|
||||
return $this->hasMany(SaisieTracker::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user