Files
ISUP/back/backend/services/rediskeyhelper/users/query.py
T
2023-09-05 14:00:40 +03:00

13 lines
535 B
Python

from orm.models import *
from orm.schema import *
from services.wsservice import *
class Userquery:
async def getuser(id):
user: User = await User.objects.select_related(["otdel", "rank","position","organization","department"]).fields(
["telephoneNumber", "phone","email","otdel","department", "organization", "position", "avatar","physicalDeliveryOfficeName",
"id", "sn", "givenName", "fullname", "position","username"
]).get(id=id)
return querytoPydantic(UserFullInfo, user)