示例#1
0
文件: users.py 项目: obasys/hikka
 def list(cls, page=0, limit=10) -> List[User]:
     offset = page * limit
     accounts = User.objects().filter().limit(limit).skip(offset)
     return list(accounts)
示例#2
0
文件: users.py 项目: obasys/hikka
 def get_by_email(cls, email: str):
     user = User.objects().filter(email=email).first()
     return user
示例#3
0
文件: users.py 项目: obasys/hikka
 def get_by_username(cls, username: str):
     user = User.objects().filter(username=username).first()
     return user
示例#4
0
文件: users.py 项目: obasys/hikka
 def get_by_id(cls, uid: str):
     user = User.objects().filter(id=uid).first()
     return user