Update the OAuth2 module to plugin (#620)

* Update the OAuth2 module to plugin

* update create user social param
This commit is contained in:
Wu Clan
2025-05-22 14:36:23 +08:00
committed by GitHub
parent 9b0d9f8296
commit bcc764142b
29 changed files with 83 additions and 81 deletions
+1 -4
View File
@@ -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')