Replace the Python-based pre-commit framework with prek (Rust) for faster hook execution. Convert .pre-commit-config.yaml to prek.toml, remove pre-commit from dev dependencies, and apply ruff auto-fixes (UP037: remove unnecessary string quotes in type annotations). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
724 B
Python
22 lines
724 B
Python
from sqlalchemy import String
|
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
|
|
from app.core.database import Base
|
|
|
|
|
|
class VersionGroup(Base):
|
|
__tablename__ = "version_groups"
|
|
|
|
id: Mapped[int] = mapped_column(primary_key=True)
|
|
name: Mapped[str] = mapped_column(String(100))
|
|
slug: Mapped[str] = mapped_column(String(100), unique=True)
|
|
|
|
games: Mapped[list[Game]] = relationship(back_populates="version_group")
|
|
routes: Mapped[list[Route]] = relationship(back_populates="version_group")
|
|
boss_battles: Mapped[list[BossBattle]] = relationship(
|
|
back_populates="version_group"
|
|
)
|
|
|
|
def __repr__(self) -> str:
|
|
return f"<VersionGroup(id={self.id}, name='{self.name}')>"
|