Backend: Medien-Typen, Sprachnotizen, Event-Felder und Sync-Härtung

- Event-Medien tragen Typ (image/video/audio), Dauer und Notiz; Videos
  bekommen ein Poster, Audio wird per ffmpeg nach AAC (audio/mp4)
  gewandelt, Originale werden mit Range-Unterstützung gestreamt.
- Upload nimmt eine Notiz (caption) direkt mit, PATCH ändert sie später.
- Neue Event-Felder: Zeitraum (end_date), Kategorie, Personen, Meilenstein.
  Regeln zentral in EventFields, damit CRUD und Sync gleich prüfen.
- Titel darf leer sein: ein Event entsteht mit dem ersten Eintrag.
- Artisan-Befehl media:transcode-voice-notes wandelt alte WebM/Ogg-Notizen,
  die Safari nicht abspielen kann.
- Login-Throttling, Settings-Validierung, Sync-Fehlercodes ohne Rohtext.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-09-25 07:00:35 +00:00
parent f79dcb9928
commit b262a6771f
59 changed files with 11879 additions and 197 deletions

View file

@ -12,11 +12,17 @@ class EventResource extends JsonResource
return [
'id' => $this->client_id,
'title' => $this->title,
'date' => $this->date->format('Y-m-d'),
'date' => substr((string) $this->date, 0, 10),
'endDate' => $this->end_date ? substr((string) $this->end_date, 0, 10) : null,
'location' => $this->location ?? '',
'category' => $this->category,
'people' => $this->people ?? [],
'emotion' => (float) $this->emotion,
'milestone' => (bool) $this->milestone,
'customColor' => $this->custom_color,
'gradientPreset' => $this->gradient_preset,
'image' => $this->image,
'keyImageTitle' => $this->key_image_title ?? '',
'note' => $this->note ?? '',
'media' => EventMediaResource::collection($this->whenLoaded('media')),
'syncStatus' => 'synced',