19 lines
503 B
Python
19 lines
503 B
Python
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from sqlalchemy.orm import Mapped, relationship
|
|
|
|
from fooder.domain.base import Base, CommonMixin, PasswordMixin, SoftDeleteMixin
|
|
|
|
if TYPE_CHECKING:
|
|
from fooder.domain.user_settings import UserSettings
|
|
|
|
|
|
class User(Base, CommonMixin, PasswordMixin, SoftDeleteMixin):
|
|
"""User."""
|
|
|
|
username: Mapped[str]
|
|
settings: Mapped[UserSettings] = relationship(
|
|
back_populates="user", lazy="selectin", uselist=False
|
|
)
|