- Flutter frontend with Provider state management - FastAPI backend with SQLAlchemy ORM - Internationalization support (EN/DE) - Clean Architecture folder structure - GoRouter for navigation - GetIt for dependency injection
24 lines
747 B
Python
24 lines
747 B
Python
import uuid
|
|
from datetime import datetime
|
|
from sqlalchemy import Column, String, Boolean, DateTime, Index
|
|
|
|
from .db import Base
|
|
|
|
|
|
class Task(Base):
|
|
__tablename__ = "tasks"
|
|
|
|
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
|
title = Column(String, nullable=False)
|
|
description = Column(String, nullable=True)
|
|
date = Column(String, nullable=False, index=True)
|
|
time = Column(String, nullable=True)
|
|
priority = Column(String, default="medium")
|
|
is_done = Column(Boolean, default=False)
|
|
created_at = Column(DateTime, default=datetime.utcnow)
|
|
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
|
|
|
__table_args__ = (
|
|
Index("ix_tasks_date", "date"),
|
|
)
|