Add CRUD functions and Pydantic schemas
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, Float
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from .enums import MinigameEnum, CourseEnum
|
||||
@@ -20,7 +20,7 @@ class HighScore(Base):
|
||||
__tablename__ = "high_scores"
|
||||
|
||||
high_score_id = Column(Integer, primary_key=True, index=True)
|
||||
score_value = Column(Integer, nullable=False)
|
||||
score_value = Column(Float, nullable=False)
|
||||
minigame = Column(Enum(MinigameEnum), nullable=False)
|
||||
owner = Column(Integer, ForeignKey("users.user_id"))
|
||||
|
||||
@@ -29,6 +29,7 @@ class CourseProgress(Base):
|
||||
__tablename__ = "course_progress"
|
||||
|
||||
course_progress_id = Column(Integer, primary_key=True, index=True)
|
||||
progress_value = Column(Float, nullable=False)
|
||||
course = Column(Enum(CourseEnum), nullable=False)
|
||||
owner = Column(Integer, ForeignKey("users.user_id"))
|
||||
|
||||
Reference in New Issue
Block a user