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

18 lines
440 B
Python

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=21, cycle=True),
primary_key=True)
name: Mapped[str]
def __repr__(self):
return f"<ExperimentCategory>"