Skip to content

Commit

Permalink
Добавляет основу для модели уровня
Browse files Browse the repository at this point in the history
  • Loading branch information
codEnjoyer committed Oct 30, 2023
1 parent e06ad29 commit 6908f5e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions backend/src/game/levels/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from sqlalchemy import String, Boolean
from sqlalchemy.orm import Mapped, mapped_column, relationship

from database import BaseModel
from game.modules.models import Module


class Level(BaseModel):
__tablename__ = 'levels'

name: Mapped[str] = mapped_column(String(length=255), nullable=False, primary_key=True)
is_accomplished: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False)

module: Mapped[Module] = relationship(back_populates='level')

0 comments on commit 6908f5e

Please sign in to comment.