feat: projekte und suche im backend

Projekte pro Benutzer mit Name und Farbe, Clips optional einem Projekt
zugeordnet. Löschen eines Projekts verschiebt seine Clips nach "ohne
Projekt". Clip-Liste filtert nach Projekt und sucht Teiltexte in Titel
und Inhalt, unabhängig von Groß-/Kleinschreibung (auch Umlaute).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dbildhauerandClaude Opus 5.5 committed 2026-10-25 13:15:05 +01:00
1 parent 848cff35b3
commit ff2860f7be
13 files changed
+711 -9

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
from datetime import datetime
from typing import Literal
from pydantic import BaseModel, ConfigDict, Field
from app.models import PROJECT_COLORS
ProjectColor = Literal[PROJECT_COLORS] # type: ignore[valid-type]
class ProjectCreate(BaseModel):
name: str = Field(max_length=1000)
color: ProjectColor = "blue"
class ProjectUpdate(BaseModel):
name: str | None = Field(default=None, max_length=1000)
color: ProjectColor | None = None
class ProjectOut(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: int
name: str
color: str
clip_count: int = 0
created_at: datetime
updated_at: datetime