Files
video-gen/video-gen-api/app/models/user_oauth_account.py
T

25 lines
967 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from sqlalchemy import ForeignKey, String
from sqlalchemy.orm import Mapped, mapped_column
from app.models.base import Base, TimestampMixin, SoftDeleteMixin
class UserOAuthAccount(Base, TimestampMixin, SoftDeleteMixin):
__tablename__ = "user_oauth_account"
id: Mapped[str] = mapped_column(
String(32), primary_key=True, comment="主键"
)
account_id: Mapped[str] = mapped_column(
String(64), ForeignKey("user_oauth.account_id", ondelete="CASCADE"),
nullable=False, index=True, comment="授权账户iduser_oauth表中同一个)"
)
advertiser_id: Mapped[str | None] = mapped_column(
String(64), nullable=True, index=True, comment="广告账户id"
)
advertiser_name: Mapped[str | None] = mapped_column(
String(128), nullable=True, comment="广告账户名"
)
advertiser_role: Mapped[str | None] = mapped_column(
String(64), nullable=True, comment="广告账户类型"
)