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

28 lines
1004 B
Python

from sqlalchemy import String, Text, Integer
from sqlalchemy.orm import Mapped, mapped_column
from app.models.base import Base, TimestampMixin, SoftDeleteMixin
class UploadMaterial(Base, TimestampMixin, SoftDeleteMixin):
__tablename__ = "upload_material"
id: Mapped[str] = mapped_column(
String(32), primary_key=True, comment="主键"
)
user_id: Mapped[str] = mapped_column(
String(64), nullable=False, index=True, comment="用户登录id"
)
advertiser_id: Mapped[str] = mapped_column(
String(64), nullable=False, index=True, comment="广告主id"
)
resource_id: Mapped[str] = mapped_column(
String(64), nullable=False, index=True, comment="资源id"
)
status: Mapped[int] = mapped_column(
Integer, nullable=False, default=1, comment="上传状态:1待上传,2上传中,3上传成功,4上传失败"
)
note: Mapped[str | None] = mapped_column(
Text, nullable=True, comment="上传备注"
)