PIbd-42_SSPR/db/models/experiment_category.py

18 lines
439 B
Python
Raw Normal View History

2024-10-25 02:15:24 +04:00
from typing import Optional
from sqlalchemy import Identity, ForeignKey
from sqlalchemy.orm import Mapped, mapped_column
from db.models.base import Base
class ExperimentCategory(Base):
__tablename__ = 'experiment_category'
id: Mapped[int] = mapped_column(Identity(start=1, cycle=True),
2024-10-25 02:15:24 +04:00
primary_key=True)
name: Mapped[str]
def __repr__(self):
return f"<ExperimentCategory>"