4f54340e89
Backend: - table audits réellement alimentée via trait Auditable (observers Eloquent) sur Utilisateur, SaisieTracker, Feed, Emotion ; mot de passe jamais loggé - 4 nouveaux tests (19/19 au total) Frontend web: - en-tête/pied République Française ajoutés aux pages connexion/inscription - bouton variant danger réellement rouge (tokens erreur DSFR) Mobile: - ~30 libellés ré-accentués (Intensité, Succès, Déconnexion, Répartition...) - Colors.secondary = rouge Marianne #E1000F (différenciation cartes/icônes) - vrai camembert SVG des rapports (react-native-svg) Docs: plans oraux mis à jour (audits actif, 29 tests, stockage JWT en Q/R) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
875 B
PHP
44 lines
875 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\Auditable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class SaisieTracker extends Model
|
|
{
|
|
use Auditable, HasFactory;
|
|
|
|
protected $table = 'saisie_trackers';
|
|
|
|
protected $fillable = [
|
|
'tracker_id',
|
|
'emotion_id',
|
|
'intensite',
|
|
'note',
|
|
'date_saisie',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'date_saisie' => 'datetime',
|
|
'intensite' => 'integer',
|
|
];
|
|
}
|
|
|
|
// ──── Relations ────
|
|
|
|
public function tracker(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Tracker::class);
|
|
}
|
|
|
|
public function emotion(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Emotion::class);
|
|
}
|
|
}
|