Files
Crm-Backend/models/auth.py
2025-10-30 17:06:30 +04:00

23 lines
562 B
Python

from typing import TYPE_CHECKING
from sqlalchemy.orm import Mapped, relationship
from models.base import BaseModel
from models.mixins import IdMixin, SoftDeleteMixin
if TYPE_CHECKING:
from models import CeleryTask, CeleryActiveTask
class User(BaseModel, IdMixin, SoftDeleteMixin):
__tablename__ = "users"
celery_tasks: Mapped["CeleryTask"] = relationship(
back_populates="user",
lazy="noload",
)
celery_active_tasks: Mapped["CeleryActiveTask"] = relationship(
back_populates="user",
lazy="noload",
)