feat: creatives and external channels
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
from sqlalchemy.orm import Mapped
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
from src import domain
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from . import TargetChannel
|
||||
|
||||
|
||||
class User(domain.Base):
|
||||
name: Mapped[str]
|
||||
telegram_id: Mapped[int] = mapped_column(unique=True, index=True)
|
||||
username: Mapped[str | None]
|
||||
|
||||
# Relationship with channels
|
||||
target_channels: Mapped[list['TargetChannel']] = relationship(back_populates='user')
|
||||
|
||||
Reference in New Issue
Block a user