my-favs/backend/app/schemas.py
RamonCalvo aea7bf5ada feat: add bookmarks CRUD API with FastAPI and Docker Compose
REST API for managing personal bookmarks (title, link, category).
PostgreSQL database with async SQLAlchemy, containerized with Docker Compose.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:37:23 -06:00

25 lines
442 B
Python

import uuid
from datetime import datetime
from pydantic import BaseModel
class BookmarkCreate(BaseModel):
title: str
link: str
class BookmarkUpdate(BaseModel):
title: str | None = None
link: str | None = None
category: str | None = None
class BookmarkResponse(BaseModel):
id: uuid.UUID
title: str
link: str
category: str | None
created_at: datetime
model_config = {"from_attributes": True}