Nattyboi's picture
added some routes
4f7effb
raw
history blame
809 Bytes
from pydantic import BaseModel
from bson import ObjectId
class UserLevel(BaseModel):
maxPoints:int
minPoints:int
levelName:str
careerPath:str
levelNumber:int
# To convert MongoDB ObjectId to string, if needed
class Config:
json_encoders = {
ObjectId: str
}
class UserPoints(BaseModel):
points:int
reason:str
userId:str
class Config:
json_encoders = {
ObjectId: str
}
class UserFeedback(BaseModel):
userId:str
feedback:str
rating:int
class Config:
json_encoders = {
ObjectId: str
}
class IndividualUserLevel(BaseModel):
totalpoints:int
userId:str
levelId:str
class Config:
json_encoders = {
ObjectId: str
}