13 lines
432 B
Python
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") |