
- Set up project structure with FastAPI - Create database models for notes - Implement Alembic migrations - Create API endpoints for note CRUD operations - Implement note export functionality (markdown, txt, pdf) - Add health endpoint - Set up linting with Ruff
14 lines
466 B
Python
14 lines
466 B
Python
from sqlalchemy import Column, DateTime, Integer, String, Text, func
|
|
|
|
from app.db.session import Base
|
|
|
|
|
|
class Note(Base):
|
|
__tablename__ = "notes"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
title = Column(String(255), index=True)
|
|
content = Column(Text, nullable=False)
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|