From 8e5190c6db285b9ff41477e9c3a0a4d88b5672cb Mon Sep 17 00:00:00 2001 From: 18610128193 <10574456+chenweiqiang-123@user.noreply.gitee.com> Date: Mon, 22 Jun 2026 09:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=8A=E4=BC=A0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-api/app/models/upload_task.py | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 video-gen-api/app/models/upload_task.py diff --git a/video-gen-api/app/models/upload_task.py b/video-gen-api/app/models/upload_task.py new file mode 100644 index 00000000..9d436411 --- /dev/null +++ b/video-gen-api/app/models/upload_task.py @@ -0,0 +1,29 @@ +from sqlalchemy import String, Text, Integer +from sqlalchemy.orm import Mapped, mapped_column + +from app.models.base import Base, TimestampMixin, SoftDeleteMixin + + +class UploadTask(Base, TimestampMixin, SoftDeleteMixin): + __tablename__ = "upload_task" + + 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="上传备注" + ) + oauth_id: Mapped[str] = mapped_column( + String(64), nullable=False, index=True, \ No newline at end of file