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:
Azmog
2026-03-11 16:27:01 +01:00
commit e3da625927
158 changed files with 25139 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Feed extends Model
{
use HasFactory;
protected $table = 'feeds';
protected $fillable = [
'titre',
'slug',
'contenu',
'image_url',
'est_publie',
'auteur_id',
'ordre',
];
protected function casts(): array
{
return [
'est_publie' => 'boolean',
'ordre' => 'integer',
];
}
// ──── Relations ────
public function auteur(): BelongsTo
{
return $this->belongsTo(Utilisateur::class, 'auteur_id');
}
// ──── Scopes ────
public function scopePublie(Builder $query): Builder
{
return $query->where('est_publie', true);
}
}