-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from flavien-hugs/develop
update: remove unusing feature
- Loading branch information
Showing
14 changed files
with
28 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[settings] | ||
known_third_party = beanie,email_validator,fastapi,fastapi_cache,fastapi_jwt,fastapi_pagination,httpx,jinja2,jose,mongomock_motor,motor,pwdlib,pydantic,pydantic_settings,pymongo,pyotp,pytest,pytest_asyncio,slugify,starlette,typer,user_agents,uvicorn,yaml | ||
known_third_party = beanie,email_validator,fastapi,fastapi_cache,fastapi_jwt,fastapi_pagination,httpx,jinja2,jose,mongomock_motor,motor,pwdlib,pydantic,pydantic_settings,pymongo,pyotp,pytest,pytest_asyncio,slugify,starlette,typer,uvicorn,yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .roles import Role | ||
from .users import User, UserOut, LoginLog | ||
from .params import Params | ||
from .roles import Role | ||
from .users import User, UserOut | ||
|
||
__all__ = ["User", "Role", "Params", "UserOut", "LoginLog"] | ||
__all__ = ["User", "Role", "Params", "UserOut"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,22 @@ | ||
from typing import Any, Dict, Optional | ||
|
||
import pymongo | ||
from beanie import Document, PydanticObjectId | ||
from pydantic import StrictBool | ||
from beanie import Document | ||
|
||
from src.config import settings | ||
from src.schemas import CreateUser | ||
from .mixins import DatetimeTimestamp | ||
|
||
|
||
class User(CreateUser, DatetimeTimestamp, Document): | ||
is_active: Optional[StrictBool] = False | ||
is_primary: Optional[StrictBool] = False | ||
is_active: Optional[bool] = False | ||
is_primary: Optional[bool] = False | ||
|
||
class Settings: | ||
name = settings.USER_MODEL_NAME | ||
use_state_management = True | ||
indexes = [pymongo.IndexModel(keys=[("fullname", pymongo.TEXT)])] | ||
|
||
|
||
class LoginLog(DatetimeTimestamp, Document): | ||
user_id: PydanticObjectId | ||
ip_address: str | ||
device: Optional[str] = None | ||
os: Optional[str] = None | ||
browser: Optional[str] = None | ||
is_tablet: Optional[bool] = False | ||
is_mobile: Optional[bool] = False | ||
is_pc: Optional[bool] = False | ||
is_bot: Optional[bool] = False | ||
is_touch_capable: Optional[bool] = False | ||
is_email_client: Optional[bool] = False | ||
|
||
class Settings: | ||
name = settings.LOGIN_LOG_MODEL_NAME | ||
use_state_management = True | ||
|
||
|
||
class UserOut(User): | ||
extras: Dict[str, Any] = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.