Automated Action 741f301b11 Implement Notes API with FastAPI and SQLite
- Set up project structure with FastAPI
- Implement user authentication system with JWT tokens
- Create database models for users, notes, and collections
- Set up SQLAlchemy ORM and Alembic migrations
- Implement CRUD operations for notes and collections
- Add filtering and sorting capabilities for notes
- Implement health check endpoint
- Update project documentation
2025-05-31 14:54:14 +00:00

37 lines
574 B
Python

from datetime import datetime
from pydantic import BaseModel, EmailStr
class UserBase(BaseModel):
email: EmailStr
username: str
class UserCreate(UserBase):
password: str
class UserUpdate(BaseModel):
email: EmailStr | None = None
username: str | None = None
password: str | None = None
class UserInDBBase(UserBase):
id: int
is_active: bool
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True
class User(UserInDBBase):
pass
class UserInDB(UserInDBBase):
hashed_password: str