加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
common.py 3.31 KB
一键复制 编辑 原始数据 按行查看 历史
郝新龙 提交于 2022-07-11 02:52 . add common.py.
from . import db
'''抖音视频'''
class DouyinVideo(db.Model):
__tablename__ = 'video_info'
# 设置字段,以及属性,传入name数据表中的字段为'aid',不传为默认的id
id = db.Column('id', db.INTEGER, primary_key=True, nullable=False,autoincrement=True)
energyId = db.Column('an', db.INTEGER, db.ForeignKey('energyLocal.id'))
anchor_name = db.Column('anchor_name', db.String(500), nullable=True)
anchor_icon_url = db.Column('anchor_icon_url', db.String(2000), nullable=True)
anchor_title = db.Column('anchor_title', db.String(500), nullable=True)
anchor_title_tag = db.Column('anchor_title_tag', db.String(20), nullable=True)
author_id = db.Column('author_id', db.BIGINT, nullable=True)
author_cover_url = db.Column('author_cover_url', db.String(2000), nullable=True)
author_signature = db.Column('author_signature', db.String(400), nullable=True)
author_nickname = db.Column('author_nickname', db.String(100), nullable=True)
author_pic = db.Column('author_pic', db.String(2000), nullable=True)
author_share_pic = db.Column('author_share_pic', db.String(2000), nullable=True)
author_prevent_download = db.Column('author_prevent_download', db.Boolean, nullable=True)
can_forward = db.Column('can_forward', db.Boolean, nullable=True)
can_share = db.Column('can_share', db.Boolean, nullable=True)
can_show_comment = db.Column('can_show_comment', db.Boolean, nullable=True)
can_comment = db.Column('can_comment', db.Boolean, nullable=True)
video_desc = db.Column('video_desc', db.String(500), nullable=True)
video_create_time = db.Column('video_create_time', db.BIGINT, nullable=True)
video_share_link_desc = db.Column('video_share_link_desc', db.TEXT, nullable=True)
video_share_url = db.Column('video_share_url', db.String(2000), nullable=True)
video_group_id = db.Column('video_group_id', db.VARCHAR(100), nullable=True)
video_comment_count = db.Column('video_comment_count', db.INT, nullable=True)
video_digg_count = db.Column('video_digg_count', db.INT, nullable=True)
video_play_count = db.Column('video_play_count', db.INT, nullable=True)
video_share_count = db.Column('video_share_count', db.INT, nullable=True)
video_collect_count = db.Column('video_collect_count', db.INT, nullable=True)
video_allow_share = db.Column('video_allow_share', db.Boolean, nullable=True)
video_is_delete = db.Column('video_is_delete', db.Boolean, nullable=True)
video_is_prohibited = db.Column('video_is_prohibited', db.Boolean, nullable=True)
video_in_reviewing = db.Column('video_in_reviewing', db.Boolean, nullable=True)
video_duration = db.Column('video_duration', db.INT, nullable=True)
text_extra = db.Column('text_extra', db.VARCHAR(200), nullable=True)
video_url_list = db.Column('video_url_list', db.VARCHAR(2000), nullable=True)
video_cover_url = db.Column('video_cover_url', db.VARCHAR(2000), nullable=True)
keyword = db.Column('keyword', db.TEXT, nullable=True)
author_sec_uid = db.Column('author_sec_uid', db.TEXT, nullable=True)
# def model_to_json_test(self):
# from flask import jsonify
# q = db.session.query(WhiteSite).first() # db = SQLAlchemy()
# q_dict = serialize(q)
# q_json = jsonify(q_dict)
# return q_json
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化