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

27 lines
1.1 KiB
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 BigInteger, ForeignKey, String
from sqlalchemy.orm import Mapped, mapped_column
from app.models.base import Base, TimestampMixin, SoftDeleteMixin
class UserOAuthApp(Base, TimestampMixin, SoftDeleteMixin):
__tablename__ = "user_oauth_app"
id: Mapped[str] = mapped_column(
String(32), primary_key=True, comment="主键"
)
app_id: Mapped[str] = mapped_column(
String(64), unique=True, nullable=False, index=True, comment="应用id"
)
secret: Mapped[str] = mapped_column(
String(256), nullable=False, comment="应用密钥"
)
status: Mapped[int] = mapped_column(
BigInteger, nullable=False, default=1, comment="状态,1=正常,2=禁用"
)
open_type: Mapped[int] = mapped_column(
BigInteger, nullable=False, index=True, comment="开户方式(1=千川,2=广告,3=本地推,4=星图,5=快手代理商,6=巨量星图,7=巨量服务单,8=腾讯服务单,9=腾讯营销K2,10=腾讯营销K3"
)
create_by: Mapped[str | None] = mapped_column(
String(32), nullable=True, comment="创建者"
)