# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# https:#docs.scrapy.org/en/latest/topics/items.html

import scrapy


class HotSearchItem(scrapy.Item):
    id = scrapy.Field()
    hot_id = scrapy.Field()
    hot_word = scrapy.Field()
    hot_value = scrapy.Field()
    category = scrapy.Field()
    realtime_rank = scrapy.Field()
    platform = scrapy.Field()
    onboard_time = scrapy.Field()
    crawl_time = scrapy.Field()


class MediaspidersItem(scrapy.Item):
    es_sid = scrapy.Field()
    es_subjectId = scrapy.Field()
    es_hkey = scrapy.Field()
    es_pkey = scrapy.Field()
    es_startid = scrapy.Field()
    es_urlname = scrapy.Field()
    es_sitename = scrapy.Field()
    es_extname = scrapy.Field()
    es_channel = scrapy.Field()
    es_groupname = scrapy.Field()
    es_urltitle = scrapy.Field()
    es_urltopic = scrapy.Field()
    es_lasttime = scrapy.Field()
    es_loadtime = scrapy.Field()
    es_urldate = scrapy.Field()
    es_urltime = scrapy.Field()
    es_srcname = scrapy.Field()
    es_authors = scrapy.Field()
    es_district = scrapy.Field()
    es_catalog = scrapy.Field()
    es_catalog1 = scrapy.Field()
    es_catalog2 = scrapy.Field()
    es_keywords = scrapy.Field()
    es_abstract = scrapy.Field()
    es_simflag = scrapy.Field()
    es_simrank = scrapy.Field()
    es_urlimage = scrapy.Field()
    es_imageflag = scrapy.Field()
    es_tableflag = scrapy.Field()
    es_doclength = scrapy.Field()
    es_content = scrapy.Field()
    es_urlcontent = scrapy.Field()
    es_bbsnum = scrapy.Field()
    es_pagelevel = scrapy.Field()
    es_urllevel = scrapy.Field()
    es_simhash = scrapy.Field()
    es_ip = scrapy.Field()
    es_heat = scrapy.Field()
    es_similaritycount = scrapy.Field()
    es_similarity = scrapy.Field()
    es_similaritytime = scrapy.Field()
    es_emotion = scrapy.Field()
    es_warningtime = scrapy.Field()
    es_carriertype = scrapy.Field()
    es_commentcount = scrapy.Field()
    es_forwardcount = scrapy.Field()
    es_positiveWords = scrapy.Field()
    es_negativeWords = scrapy.Field()
    es_negativeProbability = scrapy.Field()
    es_reportinfo = scrapy.Field()
    es_attention = scrapy.Field()
    es_warning = scrapy.Field()
    es_readsign = scrapy.Field()
    es_briefing = scrapy.Field()
    es_warning_word = scrapy.Field()
    es_attentiontime = scrapy.Field()
    es_collection = scrapy.Field()
    es_attachment = scrapy.Field()
    es_userid = scrapy.Field()
    es_contenttype = scrapy.Field()
    es_likecount = scrapy.Field()
    es_links = scrapy.Field()
    es_reactioncount = scrapy.Field()
    es_linkdesc = scrapy.Field()
    es_repostuid = scrapy.Field()
    es_repostuname = scrapy.Field()
    es_repostid = scrapy.Field()
    es_tags = scrapy.Field()
    es_mentionsaccount = scrapy.Field()
    es_video = scrapy.Field()
    es_isrepost = scrapy.Field()
    es_lang = scrapy.Field()
    es_client = scrapy.Field()
    es_snapshot = scrapy.Field()
    image_urls = scrapy.Field()
    file_urls = scrapy.Field()
    image_min_height = scrapy.Field()
    image_min_width = scrapy.Field()
    custom_image_filter = scrapy.Field()


class FaceBookUserInfo(scrapy.Item):
    ID = scrapy.Field()  # id主键
    NAME = scrapy.Field()  # 姓名
    GENDER = scrapy.Field()  # 性别
    BIRTHDAY = scrapy.Field()  # 出生日期
    EDUCATION = scrapy.Field()  # 教育经历，["学历：学校"]
    WORK = scrapy.Field()  # 工作经历 ["工作单位"]
    LIVING = scrapy.Field()  # 居住地址 ["家乡：地址","现住地：地址"]
    CONTACT = scrapy.Field()  # 联系方式 ["类别：地址"]
    YEAROVERVIEW = scrapy.Field()  # 生活纪事 ["日期：事件"]
    RELATIONSHIP = scrapy.Field()  # 感情状况
    FRIEND_IDS = scrapy.Field()  # 好友id列表


class PersonInfoItem(scrapy.Item):
    id = scrapy.Field()  # id，需要在采集时赋值，绑定PersonContactItem
    name = scrapy.Field()  # 母语名字
    photo = scrapy.Field()  # 照片
    foreignName = scrapy.Field()  # 外文名
    sex = scrapy.Field()  # 性别，字典值：0-男，1-女，2-未知
    source = scrapy.Field()  # 来源，url链接，多值，多值：["url1","url2"]
    birthday = scrapy.Field()  # 出生日期，13位时间戳
    education = scrapy.Field()  # 教育经历，多值：["学历：(时间段+)学校"]
    experience = scrapy.Field()  # 工作经历，多值：["时间段：单位名称(+职位等)"]
    chronicle = scrapy.Field()  # 生活纪事，多值：["时间：事件概述"]
    institutions = scrapy.Field()  # 所属机构，多值：["",""]
    departments = scrapy.Field()  # 所属部门，多值：[""]
    positions = scrapy.Field()  # 职位，多值：[""]
    languages = scrapy.Field()  # 常用语言，多值：["汉语","英语"]
    nationality = scrapy.Field()  # 国籍，字典值，参考zq字典
    directions = scrapy.Field()  # 业务方向，多值：[""]
    researchFields = scrapy.Field()  # 专业领域，多值：[""]
    projects = scrapy.Field()  # 研究项目，多值：[""]
    honor = scrapy.Field()  # 所获荣誉，多值：[""]
    religions = scrapy.Field()  # 宗教信仰，多值：[""]
    introduction = scrapy.Field()  # 简介
    updateTime = scrapy.Field()  # 更新时间，13位时间戳
    remarks = scrapy.Field()  # 备注


class TelegramGroup(scrapy.Item):
    id = scrapy.Field()  # 群 ID
    type = scrapy.Field()  # 群类型：o-公开群、p-私有群、c-频道群
    name = scrapy.Field()  # 群名称（群昵称）
    link = scrapy.Field()  # 群用户名（群链接）
    number_of_members = scrapy.Field()  # 群成员数量
    description = scrapy.Field()  # 群描述信息（群简介）
    members_id = scrapy.Field()  # 群成员 ID
    profile_photo = scrapy.Field()  # 头像 blob


class TelegramMessage(scrapy.Item):
    id = scrapy.Field()  # 消息 ID（根据发送者、时间、文本生成）
    sender = scrapy.Field()  # 消息发送者：ID、用户名、昵称
    send_time = scrapy.Field()  # 消息发送时间
    receiver = scrapy.Field()  # 消息接收者：群类型、群用户名、群昵称、群ID
    text = scrapy.Field()  # 消息文本：纯文字、表情
    files = scrapy.Field()  # 消息文件：图片、视频、音频、文档
    links = scrapy.Field()  # 消息链接：网页链接、应用链接、社交媒体链接


class TelegramMember(scrapy.Item):
    id = scrapy.Field()  # 成员 ID
    name = scrapy.Field()  # 成员用户名
    alias = scrapy.Field()  # 成员昵称
    role = scrapy.Field()  # 成员角色：c-创建者、a-管理员、u-普通成员
    mobile = scrapy.Field()  # 成员手机号
    profile_photo = scrapy.Field()  # 头像 blob
