修改资源素材表字段
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
from sqlalchemy import BigInteger, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.models.base import Base, TimestampMixin, SoftDeleteMixin
|
||||
|
||||
|
||||
class ResourcesMaterial(Base, TimestampMixin, SoftDeleteMixin):
|
||||
__tablename__ = "resources_material"
|
||||
|
||||
id: Mapped[str] = mapped_column(
|
||||
String(32), primary_key=True, comment="主键"
|
||||
)
|
||||
oauth_id: Mapped[str] = mapped_column(
|
||||
String(64), nullable=False, index=True, comment="授权表user_oauth自增id"
|
||||
)
|
||||
advertiser_id: Mapped[str | None] = mapped_column(
|
||||
String(64), nullable=True, index=True, comment="广告主id"
|
||||
)
|
||||
target_table: Mapped[str | None] = mapped_column(
|
||||
String(64), nullable=True, comment="资源表名称"
|
||||
)
|
||||
target_id: Mapped[str | None] = mapped_column(
|
||||
String(64), nullable=True, comment="资源表id"
|
||||
)
|
||||
material_id: Mapped[str | None] = mapped_column(
|
||||
String(64), nullable=True, index=True, comment="素材id"
|
||||
)
|
||||
upload_id: Mapped[str | None] = mapped_column(
|
||||
String(128), nullable=True, comment="上传资源平台id,图片id,视频id"
|
||||
)
|
||||
resource_type: Mapped[str | None] = mapped_column(
|
||||
String(16), nullable=True, comment="资源类型,image或者video"
|
||||
)
|
||||
user_id: Mapped[str | None] = mapped_column(
|
||||
String(64), nullable=True, index=True, comment="用户登录id"
|
||||
)
|
||||
Reference in New Issue
Block a user