class TrendPusher(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) date = db.Column(db.Date) windowsize = db.Column(db.Integer, default=1) uid = db.Column(db.Integer()) timestamp = db.Column(db.Integer()) user_info = db.Column(db.Text) weibo_info = db.Column(db.Text) domain = db.Column(db.String(20)) rank = db.Column(db.Integer) def __init__(self, topic, date, windowsize, uid, timestamp, user_info, weibo_info, domain, rank): self.topic = topic self.date = date self.windowsize = windowsize self.uid = uid self.timestamp = timestamp self.user_info = user_info self.weibo_info = weibo_info self.domain = domain self.rank = rank @classmethod def _name(cls): return u'TrendPusher'
class OpinionWeibosNew(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) child_topic = db.Column(db.Text) weight = db.Column(db.Float) mid = db.Column(db.String(20)) uid = db.Column(db.String(20)) weibos = db.Column(db.Text) time = db.Column(db.String(20)) r_count = db.Column(db.Integer) c_count = db.Column(db.Integer) repeat = db.Column(db.Integer) def __init__(self, topic, child_topic, weight, mid, uid, weibos, time, r_count, c_count, repeat): self.topic = topic self.child_topic = child_topic self.weight = weight self.mid = mid self.uid = uid self.weibos = weibos self.time = time self.r_count = r_count self.c_count = c_count self.repeat = repeat @classmethod def _name(cls): return u'OpinionWeibosNew'
class OpinionTopic(db.Model): id = db.Column(db.Integer, primary_key=True) topic = db.Column(db.String(100))#话题 opinion = db.Column(db.String(20))#观点 def __init__(self, topic, opinion): self.topic = topic self.opinion = opinion @classmethod def _name(cls): return u'OpinionTopic'
class SentimentPoint(db.Model):#情绪拐点 id = db.Column(db.Integer, primary_key=True) topic = db.Column(db.String(100))#话题名 stype = db.Column(db.String(20))#拐点情绪类型标签('happy','angry','sad') ts = db.Column(db.Integer())#拐点时间 def __init__(self, topic, stype, ts): self.topic = topic self.stype = stype self.ts = ts @classmethod def _name(cls): return u'SentimentPoint'
class OpinionTestWeibos(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) child_topic = db.Column(db.String(100)) weibos = db.Column(db.Text) def __init__(self, topic, child_topic, weibos): self.topic = topic self.child_topic = child_topic self.weibos = weibos @classmethod def _name(cls): return u'OpinionTestWeibos'
class OpinionWeibos(db.Model): id = db.Column(db.Integer, primary_key=True) opinionTopic = db.Column(db.Integer)#话题、观点对应表中id字段 mid = db.Column(db.String(20))#微博id weibos = db.Column(db.Text)#微博文本 user = db.Column(db.String(20))#用户昵称 userid = db.Column(db.String(20))#用户id posttime = db.Column(db.String(20))#发布时间 weibourl = db.Column(db.String(20))#微博url(目前没啥用,都是‘#’) userurl = db.Column(db.String(20))#用户url(目前没啥用,都是‘#’) repost = db.Column(db.Integer)#转发数 stype = db.Column(db.String(20))#情绪类型('happy','angry','sad') def __init__(self, opinionTopic, mid, weibos, user, userid, posttime, weibourl, userurl, repost, stype): self.opinionTopic = opinionTopic self.mid = mid self.weibos = weibos self.user = user self.userid = userid self.posttime = posttime self.weibourl = weibourl self.userurl = userurl self.repost = repost self.stype = stype @classmethod def _name(cls): return u'OpinionWeibos'
class QuotaQuickness(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) domain = db.Column(db.String(20)) quickness = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, domain, quickness): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.domain = domain self.quickness = quickness @classmethod def _name(cls): return u'QuotaQuickness'
class CityRepostNews(db.Model): id = db.Column(db.Integer, primary_key = True, autoincrement = True) original = db.Column(db.Integer()) topic = db.Column(db.String(100)) mid = db.Column(db.String(20)) # 新闻ID ts = db.Column(db.Integer()) origin_location = db.Column(db.Text) # 原始新闻发布地点 repost_location = db.Column(db.Text) # 转发新闻发布地点 def __init__(self, original, topic, mid, ts, origin_location, repost_location ): self.topic = topic self.original = original self.mid = mid self.ts = ts self.origin_location = origin_location self.repost_location = repost_location @classmethod def _name(cls): return u'CityRepostNews'
class NewTopicStatus(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) module = db.Column(db.String(20)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) category = db.Column(db.String(20)) db_date = db.Column(db.Date) status = db.Column(db.Integer) def __init__(self, module, start_ts, end_ts, category, db_date, status): self.module = module self.start_ts = start_ts self.end_ts = end_ts self.category = category self.db_date = db_date self.status = status @classmethod def _name(cls): return u'NewTopicStatus'
class ProvinceWeibos(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) end = db.Column(db.Integer()) range = db.Column(db.Integer()) limit = db.Column(db.Integer()) province = db.Column(db.String(20)) city = db.Column(db.String(20)) weibos = db.Column(db.Text) def __init__(self, topic, end, range, limit, province,city,weibos): self.topic = topic self.end = end self.range = range self.limit = limit self.province = province self.city = city self.weibos = weibos @classmethod def _name(cls): return u'ProvinceWeibos'
class QuicknessCount(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) end = db.Column(db.Integer()) range = db.Column(db.Integer()) mtype = db.Column(db.Integer()) domain = db.Column(db.String(20)) topnum = db.Column(db.Integer()) allnum = db.Column(db.Integer()) def __init__(self, topic, range, end, mtype, domain, topnum, allnum): self.topic = topic self.range = range self.end = end self.mtype = mtype self.domain = domain self.topnum = topnum self.allnum = allnum @classmethod def _name(cls): return u'QuicknessCount'
class DsTopicIdentification(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) rank = db.Column(db.Integer) userId = db.Column(db.Integer()) identifyDate = db.Column(db.Date) identifyWindow = db.Column(db.Integer, default=1) identifyMethod = db.Column(db.String(20), default='pagerank') pr = db.Column(db.String(20), default='pagerank') def __init__(self, topic, rank, userId, identifyDate, identifyWindow, identifyMethod, pr): self.topic = topic self.rank = rank self.userId = userId self.identifyDate = identifyDate self.identifyWindow = identifyWindow self.identifyMethod = identifyMethod self.pr = pr @classmethod def _name(cls): return u'DsTopicIdentification'
class Topics(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) def __init__(self, topic, start_ts, end_ts): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts @classmethod def _name(cls): return u'Topics'
class AllFrequentUser(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) db_time = db.Column(db.Date) ffu_kind = db.Column(db.String(20)) user_frequent = db.Column(db.Text) def __init__(self, db_time, ffu_kind, user_frequent): self.db_time = db_time self.ffu_kind = ffu_kind self.user_frequent = user_frequent @classmethod def _name(cls): return u'AllFrequentUser'
class OpinionTestRatio(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) #ts = db.clumns(db.BigInteger(10),unsigned=True) child_topic = db.Column(db.Text) ratio = db.Column(db.Float) def __init__(self, topic, child_topic, ratio): self.topc = topic self.child_topic = child_topic self.ratio = ratio @classmethod def _name(cls): return u'OpinionTestRatio'
class QuotaCoverage(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) coverage = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, coverage): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.coverage = coverage @classmethod def _name(cls): return u'QuotaCoverage'
class OpinionTestTime(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) child_topic = db.Column(db.Text) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) def __init__(self, topic, child_topic, start_ts, end_ts): self.topic = topic self.child_topic = child_topic self.start_ts = start_ts self.end_ts = end_ts @classmethod def _name(cls): return u'OpinionTestTime'
class QuotaMediaImportance(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) media_importance = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, media_importance): self.topic =topic self.start_ts = start_ts self.end_ts = end_ts self.media_importance = media_importance @classmethod def _name(cls): return u'QuotaMediaImportance'
class QuotaSentiment(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) sratio = db.Column(db.Text) def __init__(self, topic, start_ts, end_ts, sratio): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.sratio = sratio @classmethod def _name(cls): return u'QuotaSentiment'
class Source(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) date = db.Column(db.Date) windowsize = db.Column(db.Integer, default=1) userid = db.Column(db.Integer()) def __init__(self, topic, date, windowsize, userid): self.topic = topic self.date = date self.windowsize = windowsize self.userid = userid @classmethod def _name(cls): return u'Source'
class QuotaDurationExp(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) exp = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, exp): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.exp = exp @classmethod def _name(cls): return u'QuotaDurationExp'
class PlaceSensitivity(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) words = db.Column(db.Text) def __init__(self, topic, start_ts, end_ts, words): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.words = words @classmethod def _name(cls): return u'PlaceSensitivity'
class CoverageExp(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts= db.Column(db.Integer()) end_ts = db.Column(db.Integer()) coverage_exp = db.Column(db.Integer) def __init__(self, topic, start_ts, end_ts, coverage_exp): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.coverage_exp = coverage_exp @classmethod def _name(cls): return u'CoverageExp'
class PersonSensitivity(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) person = db.Column(db.Text) def __init__(self, topic, start_ts, end_ts, person): self.topic = topic self.start_ts = start_ts self_end_ts = end_ts self.person = person @classmethod def _name(cls): return u'PersonSensitivity'
class QuotaFTransmission(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts =db.Column(db.Integer()) end_ts = db.Column(db.Integer()) f_transmission = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, f_transmission): self.topic = topic self.start_ts =start_ts self.end_td = end_ts self.f_transmission = f_transmission @classmethod def _name(cls): return u'QuotaFTransmission'
class QuotaAttentionExp(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) exp = db.Column(db.Text) # exp={'media':x1, 'other':x2, 'opinion_leader':x3, 'oversea':x4, 'folk':x5} def __init__(self, topic, start_ts, end_ts, exp): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.exp = exp @classmethod def _name(cls): return u'QuotaAttentionExp'
class QuotaIndex(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) index = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, index): self.topic = topic self.start_ts =start_ts self.end_ts = end_ts self.index = index @classmethod def _name(cls): return u'QuotaIndex'
class QuotaFInvolved(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) f_involved = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, f_involved): self.topic = topic self,start_ts = start_ts self.end_ts = end_ts self.f_involved = f_involved @classmethod def _name(cls): return u'QuotaFInvolved'
class QuotaGeoPenetration(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) pcount = db.Column(db.Text) def __init__(self, topic, start_ts, end_ts, pcount): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.pcount = pcount @classmethod def _name(cls): return u'QuotaGeoPenetration'
class QuotaPersonSensitivity(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) topic = db.Column(db.String(100)) start_ts = db.Column(db.Integer()) end_ts = db.Column(db.Integer()) pr = db.Column(db.Float) def __init__(self, topic, start_ts, end_ts, pr): self.topic = topic self.start_ts = start_ts self.end_ts = end_ts self.pr = pr @classmethod def _name(cls): return u'QuotaPersonSensitivity'