5/app/api/v1/models/and.py
2025-03-20 13:05:13 +01:00

13 lines
432 B
Python

from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship
from app.api.db.database import Base
class And(Base):
__tablename__ = "ands"
id = Column(Integer, primary_key=True, index=True)
name = Column(String, index=True)
description = Column(String, nullable=True)
task_id = Column(Integer, ForeignKey("tasks.id"))
task = relationship("Task", back_populates="ands")