# coding: utf-8 from sqlalchemy import Column, DateTime, Float, Index, String, TIMESTAMP, Text, text from sqlalchemy.dialects.mysql import BIGINT, INTEGER, VARCHAR from sqlalchemy.ext.declarative import declarative_base from app.model.base import Base, BaseModel class ZhiboTheme(Base, BaseModel): __tablename__ = 'zhibo_theme' __table_args__ = {'comment': '直播间信息表'} id = Column(String(64), primary_key=True, comment='唯一主键') zt_name = Column(String(150), comment='主题名称') zt_starttime = Column(DateTime, comment='开播时间') zt_endtime = Column(DateTime, comment='结束时间') zt_desc = Column(String(512), comment='描述') zt_roomnum = Column(String(32), comment='(废弃)') create_time = Column(DateTime, nullable=False, comment='创建时间') create_by = Column(String(64), comment='创建人') update_time = Column(DateTime, comment='修改时间') update_by = Column(String(64), comment='修改人') deletetag = Column(String(3), comment='删除标识 0:正常,1: 删除 2:草稿') zt_status = Column(String(2), server_default=text("'1'"), comment='直播间状态 1未开始,2直播中,3已结束') zt_backimg = Column(String(128), comment='直播背景图(废弃)') share_pattern = Column(INTEGER(3), comment='分享模式') zt_img = Column(String(128), comment='直播封面') zt_iszhibo = Column(String(3), comment='是否含直播') zt_proid = Column(String(64), comment='关联产品') zt_uname = Column(String(128), comment='培训人') zt_flag = Column(String(3), comment='参与人开放标识') org_id = Column(String(64), comment='机构ID') zt_password = Column(String(64), comment='密码') zt_label = Column(String(1024), comment='直播标签') zt_userids = Column(Text, comment='参与人') zt_mute = Column(String(3), comment='是否禁言 0:否 1:是') zt_type = Column(String(64), server_default=text("'1'"), comment='直播类型 1探普之夜,2探普八点半') zt_appointment_nums = Column(INTEGER(8), server_default=text("'0'")) zt_info = Column(Text) zt_qrcode = Column(String(256)) zt_fuli = Column(Text) zt_cardinal = Column(INTEGER(11), server_default=text("'0'"), comment='直播基数') zt_isshare = Column(String(3), server_default=text("'0'"), comment='是否可分享') zt_iscollect_userinfo = Column(String(3), server_default=text("'0'"), comment='是否收集用户信息,1收集,0不收集') zt_isverification_phone = Column(String(3), server_default=text("'0'"), comment='是否开启手机号验证') zt_examid = Column(String(128)) parent_id = Column(String(64), index=True, comment='母直播间id') room_type = Column(INTEGER(5), server_default=text("'1'"), comment='直播间类型 1母直播间,2子直播间') video_type = Column(INTEGER(5), server_default=text("'1'"), comment='视屏类型 1视频,2音频') duration_second_show = Column(Float(11, True), server_default=text("'0.00'"), comment='直播时长 显示 单位小时') real_start_time = Column(DateTime, comment='实际开始时间') real_end_time = Column(DateTime, comment='真实结束时间') real_duration_second = Column(INTEGER(11), comment='直播实际时长') reservation = Column(INTEGER(5), server_default=text("'0'"), comment='是否可预约 1:需要预约 0:不需要预约') can_broadcast = Column(INTEGER(5), server_default=text("'0'"), comment='可转播设置 1:可转播 0:不可转播') broadcast_score = Column(INTEGER(11), server_default=text("'0'"), comment='转播积分') broadcast_num = Column(INTEGER(11), server_default=text("'0'"), comment='转播数量') participation_rigth = Column(INTEGER(5), server_default=text("'0'"), comment='探普云参与权限0:所有人,1仅注册用户,2仅探普会员可进入,3需要密码') replay = Column(INTEGER(5), server_default=text("'0'"), comment='回放设置 0:不录制 1:录制') opening_remarks = Column(String(200), comment='开场白') user_title = Column(String(20), comment='直播间头衔') guest_greetings = Column(String(200), comment='访客问候语') guest_card = Column(String(2), nullable=False, server_default=text("'0'"), comment='是否给访客发送名片(0不发送 1发送) (-针对理财师)') guest_we_shop = Column(String(2), nullable=False, server_default=text("'0'"), comment='是否给访客发送微店(0不发送 1发送) (-针对理财师)') friend_greetings = Column(String(200), comment='一级好友问候语') friend_card = Column(String(2), nullable=False, server_default=text("'0'"), comment='是否给好友发送微店(0不发送 1发送) (-针对理财师)') friend_we_shop = Column(String(2), nullable=False, server_default=text("'0'"), comment='是否给好友发送微店(0不发送 1发送) (-针对理财师)') recommend_home_page = Column(INTEGER(5), server_default=text("'0'"), comment='推荐到微店首页 1:可推荐 0:不可推荐') recommend_time = Column(DateTime, comment='推荐到首页的时间') participants_num = Column(INTEGER(11), server_default=text("'0'"), comment='参与人数') online_num = Column(INTEGER(11), server_default=text("'0'"), comment='在线人数') reservation_num = Column(INTEGER(11), server_default=text("'0'"), comment='预约人数') information_sheet_num = Column(INTEGER(11), server_default=text("'0'"), comment='已填信息表人数') replay_num = Column(INTEGER(11), server_default=text("'0'"), comment='回放人数') sms_template_id = Column(String(32), comment='短信模板id') manager_name = Column(String(100), comment='主讲人描述,用于直播间主讲人描述') recommend_home_tanpu = Column(INTEGER(5), server_default=text("'0'"), comment='推荐到探普学堂首页 1:推荐 0:不推荐') recommend_time_tanpu = Column(DateTime, comment='推荐首页(探普学堂)推荐时间') participants_pv = Column(INTEGER(11), comment='参数人次 统计pv') participants_child_pv = Column(INTEGER(11), server_default=text("'0'"), comment='子直播间参与人数总计') isPrivacy = Column(INTEGER(3), comment='是否隐私直播间0否1是') iscreate_group_success = Column(INTEGER(3), server_default=text("'0'"), comment='是否已创建群组 0:否 1:是') max_online_num = Column(INTEGER(11), server_default=text("'0'"), comment='在线人数峰值') tags = Column(String(255), comment='标签') class ZhiboFile(Base, BaseModel): __tablename__ = 'zhibo_file' __table_args__ = {'comment': '直播间附件表'} id = Column(String(64), primary_key=True, comment='唯一主键') zf_themeid = Column(String(32), comment='主题ID') zf_url = Column(String(256), comment='附件地址') zf_file_type = Column(String(3), comment='上传类型 1直播间附件,2直播间图片 ,3直播间转码视频,4直播间转码音频,5直播间原始视频,6直播间原始音频,7讲师本地上传图片,8用户头像,9问卷图片,10 直播间课件') zf_use = Column(String(3), comment='用途') zf_no = Column(String(3), comment='序号') create_time = Column(DateTime, nullable=False, comment='创建时间') create_by = Column(String(64), comment='创建人') update_time = Column(DateTime, comment='修改时间') update_by = Column(String(64), comment='修改人') deletetag = Column(String(3), comment='删除标识 0:正常,1: 删除 2:草稿') org_id = Column(String(64), server_default=text("'1'"), comment='机构ID') file_ext = Column(String(10), comment='文件扩展名') file_size = Column(INTEGER(11), comment='文件大小') file_md5 = Column(String(32), comment='文件Md5') remark = Column(String(100), comment='备注 文件名') status = Column(String(5), comment='文件状态 0:未完成,1:已完成') task_id = Column(String(64), comment='阿里云异步转换id') cs_file_id = Column(String(64), comment='filerecord记录id') file_num = Column(String(11), comment='附件总页数 用于转换图片使用')