from sqlalchemy import Column, Integer, VARCHAR
from sqlalchemy.orm import relationship

from app.infrastructure.database.models import Base


class Status(Base):
    __tablename__ = 'statuses'

    id = Column(Integer, primary_key=True, autoincrement=True)
    name = Column(VARCHAR(100), nullable=False)

    total_orders = relationship('TotalOrder', back_populates='status')
