summaryrefslogtreecommitdiff
path: root/app/models/integrations.py
diff options
context:
space:
mode:
authorl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-04-04 00:03:04 +0300
committerl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-04-04 00:03:04 +0300
commit63e87a3ed84ee9e9e4a4ff329a40d2b7ce5e5d0d (patch)
treec24731c200df3b5854a5abc14f7a5481a33d838a /app/models/integrations.py
parentd835d79eb24c730ec8148415113e846a01cefd19 (diff)
add profile
Diffstat (limited to 'app/models/integrations.py')
-rw-r--r--app/models/integrations.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/models/integrations.py b/app/models/integrations.py
index 4a1ddb9..f3eaca4 100644
--- a/app/models/integrations.py
+++ b/app/models/integrations.py
@@ -1,7 +1,12 @@
+from typing import TYPE_CHECKING
+
from sqlalchemy import ForeignKey, Integer, String
-from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
+from sqlalchemy.orm import Mapped, mapped_column, relationship
+
+from app.utils.db import Base
-Base = DeclarativeBase()
+if TYPE_CHECKING:
+ from .user import User
class UserIntegration(Base):
@@ -17,3 +22,7 @@ class UserIntegration(Base):
x: Mapped[str | None] = mapped_column(String(255), nullable=True) # Twitter/X
behance: Mapped[str | None] = mapped_column(String(255), nullable=True)
instagram: Mapped[str | None] = mapped_column(String(255), nullable=True)
+
+ user: Mapped["User"] = relationship(
+ "User", back_populates="integrations", uselist=False
+ )