From f5ffcb18680cb949acc60c3955cb0597c9700e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Wed, 21 Sep 2022 16:43:25 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=81=8C=E4=BD=8D=E6=A8=A1=E7=B3=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/interview.py | 1 + schemas/user.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/api_v1/endpoints/interview.py b/api/api_v1/endpoints/interview.py index d4978eb..16f928f 100644 --- a/api/api_v1/endpoints/interview.py +++ b/api/api_v1/endpoints/interview.py @@ -1540,6 +1540,7 @@ async def login( 'user_id': user.user_id, # 钉钉id 'id': user.id, # 账号的唯一标识 'rank': user.rank, # 区分hr和面试官 + 'nickname':user.nickname, # 显示名 'token': security.create_access_token( expires_delta=access_token_expires, user_id=user.user_id, email=user.email, tel=user.tel, name=user.name, rank=user.rank), diff --git a/schemas/user.py b/schemas/user.py index 6044187..e33b34f 100644 --- a/schemas/user.py +++ b/schemas/user.py @@ -77,7 +77,8 @@ class UserDBRW(DBBase): rank: int # 判断是hr还是面试官 email: str # 邮箱 tel: str # 手机号 - name: str # 名字 + name: str # 账号 + nickname: str # 显示名 last_login_ts: str = '尚未登录' # 登录时间 create_date: datetime = datetime.now() # 创建账号的时间 state: int = 0 # 默认刚创账号是不锁定的