mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 13:12:24 +00:00
Update the OAuth2 module to plugin (#620)
* Update the OAuth2 module to plugin * update create user social param
This commit is contained in:
@@ -15,7 +15,7 @@ from backend.database.db import uuid4_str
|
||||
from backend.utils.timezone import timezone
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from backend.app.admin.model import Dept, Role, UserSocial
|
||||
from backend.app.admin.model import Dept, Role
|
||||
|
||||
|
||||
class User(Base):
|
||||
@@ -55,8 +55,5 @@ class User(Base):
|
||||
)
|
||||
dept: Mapped[Dept | None] = relationship(init=False, back_populates='users')
|
||||
|
||||
# 用户社交信息一对多
|
||||
socials: Mapped[list[UserSocial]] = relationship(init=False, back_populates='user')
|
||||
|
||||
# 用户角色多对多
|
||||
roles: Mapped[list[Role]] = relationship(init=False, secondary=sys_user_role, back_populates='users')
|
||||
|
||||
Reference in New Issue
Block a user