[V0.4] Added TODOs
This commit is contained in:
17
backend/modules/todo/models.py
Normal file
17
backend/modules/todo/models.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# backend/modules/todo/models.py
|
||||
from sqlalchemy import Column, Integer, String, Boolean, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
from core.database import Base
|
||||
import datetime
|
||||
|
||||
class Todo(Base):
|
||||
__tablename__ = "todos"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
task = Column(String, index=True, nullable=False)
|
||||
date = Column(DateTime, nullable=True)
|
||||
remind = Column(Boolean, default=False)
|
||||
complete = Column(Boolean, default=False)
|
||||
owner_id = Column(Integer, ForeignKey("users.id"))
|
||||
|
||||
owner = relationship("User") # Add relationship if needed, assuming User model exists in auth.models
|
||||
Reference in New Issue
Block a user