#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2024/3/11 11:39 AM
# @Author  : zy
# @Site    :
# @File    : field_info.py
# @Software: PyCharm
"""
文件功能:
指标信息
"""

# 中间层 page->day
MIDDLE_MODEL = ["social_page_summary", "social_page_summary_insight"]

# 授权表 page->key-value
INSIGHT_MODEL = [
    "social_page_insight",
    "social_post_insight",
    "social_page_insight_linkedin",
]

# ES page->day
ES_MODEL = [
    "page_posts_facebook",
    "page_posts_twitter",
    "page_posts_instagram",
    "page_posts_linkedin",
    "page_posts_youtube",
    "page_posts_wechat",
    "page_posts_tiktok",
    "page_posts_vkontakte",
]

# social_page_summary 指标
SOCIAL_PAGE_SUMMARY = {
    "page_score": {
        "column_comment": "os评分",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": True,
        "is_last_date": False,
    },
    "page_score_real": {
        "column_comment": "当日os评分真实值(page_score/10)",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "fans": {
        "column_comment": "粉丝数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": True,
        "is_last_date": False,
    },
    "fans_diff": {
        "column_comment": "粉丝增长",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "act_per_post": {
        "column_comment": "单帖互动数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "act_thousand_fans": {
        "column_comment": "千粉互动",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "act_thousand_fans_per_post": {
        "column_comment": "单帖千粉互动",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "topic_active_per_view": {
        "column_comment": "单帖互动率",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "video_views_per_post": {
        "column_comment": "单帖视频观看数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "following": {
        "column_comment": "关注(总)数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "following_diff": {
        "column_comment": "当日新增关注数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "list_count": {
        "column_comment": "属于列表(总)数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "list_diff": {
        "column_comment": "当日新增属于列表数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "jobs_count": {
        "column_comment": "当日发布职位数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "jobs_diff": {
        "column_comment": "当日发布职位数(LinkedIn)",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "staff_count": {
        "column_comment": "当日在职员工(总)数",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "staff_diff": {
        "column_comment": "LIN主页员工数增长(较前一日)",
        "table_name": "social_page_summary",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
}

# social_page_summary_insight 指标
SOCIAL_PAGE_SUMMARY_INSIGHT = {
    "page_impressions": {
        "column_comment": "主页曝光次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_paid": {
        "column_comment": "主页付费曝光",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_organic": {
        "column_comment": "主页自然曝光",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_checkin": {
        "column_comment": "主页曝光来源_checkin",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_coupon": {
        "column_comment": "主页曝光来源_coupon",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_event": {
        "column_comment": "主页曝光来源_event",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_fan": {
        "column_comment": "主页曝光来源_fan",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_mention": {
        "column_comment": "主页曝光来源_mention",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_pagepost": {
        "column_comment": "主页曝光来源_pagepost",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_userpost": {
        "column_comment": "主页曝光来源_userpost",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_question": {
        "column_comment": "主页曝光来源_question",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_other": {
        "column_comment": "主页曝光来源_other",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_unique": {
        "column_comment": "主页覆盖人数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_paid_unique": {
        "column_comment": "主页付费覆盖",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_organic_unique": {
        "column_comment": "主页自然覆盖",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_checkin": {
        "column_comment": "主页覆盖来源_checkin",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_coupon": {
        "column_comment": "主页覆盖来源_coupon",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_event": {
        "column_comment": "主页覆盖来源_event",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_fan": {
        "column_comment": "主页覆盖来源_fan",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_mention": {
        "column_comment": "主页覆盖来源_mention",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_pagepost": {
        "column_comment": "主页覆盖来源_pagepost",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_userpost": {
        "column_comment": "主页覆盖来源_userpost",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_question": {
        "column_comment": "主页覆盖来源_question",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_impressions_by_story_type_unique_other": {
        "column_comment": "主页覆盖来源_other",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_engaged_users": {
        "column_comment": "主页互动用户数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_positive_feedback_by_type_answer": {
        "column_comment": "用户积极操作次数_answer",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_positive_feedback_by_type_claim": {
        "column_comment": "用户积极操作次数_claim",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_positive_feedback_by_type_comment": {
        "column_comment": "用户积极操作次数_comment",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_positive_feedback_by_type_like": {
        "column_comment": "用户积极操作次数_like",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_positive_feedback_by_type_link": {
        "column_comment": "用户积极操作次数_link",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_positive_feedback_by_type_other": {
        "column_comment": "用户积极操作次数_other",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_positive_feedback_by_type_rsvp": {
        "column_comment": "用户积极操作次数_rsvp",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_negative_feedback": {
        "column_comment": "用户消极操作次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_negative_feedback_by_type_hide_clicks": {
        "column_comment": "用户消极操作次数_隐藏帖子",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_negative_feedback_by_type_all_clicks": {
        "column_comment": "用户消极操作次数_隐藏全部帖子",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_negative_feedback_by_type_report_spam_clicks": {
        "column_comment": "用户消极操作次数_举报垃圾信息",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_negative_feedback_by_type_unlike_page_clicks": {
        "column_comment": "用户消极操作次数_取消赞",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_consumptions": {
        "column_comment": "用户点击次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_consumptions_by_consumption_type_link_click": {
        "column_comment": "用户点击次数_link_click",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_consumptions_by_consumption_type_other_click": {
        "column_comment": "用户点击次数_other_click",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_consumptions_by_consumption_type_button_click": {
        "column_comment": "用户点击次数_button_click",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_consumptions_by_consumption_type_photo_view": {
        "column_comment": "用户点击次数_photo_view",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_consumptions_by_consumption_type_video_view": {
        "column_comment": "用户点击次数_video_view",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_click_email_contacts": {
        "column_comment": "主页点击次数_点击邮箱链接",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_click_get_directions_clicks": {
        "column_comment": "主页点击次数_点击方位链接",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_click_phone_call_clicks": {
        "column_comment": "主页点击次数_点击呼叫链接",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_click_text_message_clicks": {
        "column_comment": "主页点击次数_点文本消息链接",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_click_website_clicks": {
        "column_comment": "主页点击次数_点击网站链接",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_reactions_total": {
        "column_comment": "主页心情数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "profile_views": {
        "column_comment": "主页访客人数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_reactions_total_anger": {
        "column_comment": "主页心情分类_anger",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_reactions_total_haha": {
        "column_comment": "主页心情分类_haha",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_reactions_total_like": {
        "column_comment": "主页心情分类_like",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_reactions_total_love": {
        "column_comment": "主页心情分类_love",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_reactions_total_sorry": {
        "column_comment": "主页心情分类_sorry",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_reactions_total_wow": {
        "column_comment": "主页心情分类_wow",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_fans": {
        "column_comment": "粉丝数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": True,
        "is_last_date": False,
    },
    "page_fan_adds_unique": {
        "column_comment": "新增粉丝数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fan_removes_unique": {
        "column_comment": "流失粉丝数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fan_adds_by_paid_non_paid_unique_paid": {
        "column_comment": "新增粉丝来源（付费）",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_like_source_unique_ads": {
        "column_comment": "新增粉丝来源_Ads",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_like_source_unique_yourpage": {
        "column_comment": "新增粉丝来源_YourPage",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_like_source_unique_newsfeed": {
        "column_comment": "新增粉丝来源_NewsFeed",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_like_source_unique_pagesuggestions": {
        "column_comment": "新增粉丝来源_PageSuggestions",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_like_source_unique_rlra": {
        "column_comment": "新增粉丝来源_RestoredLikesfromReactivatedAccounts",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_like_source_unique_search": {
        "column_comment": "新增粉丝来源_Search",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_like_source_unique_other": {
        "column_comment": "新增粉丝来源_Other",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_unlike_source_unique_dmar": {
        "column_comment": "粉丝流失方式_Deactivated or Memorialized Account Removals",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_comments_total": {
        "column_comment": "主页帖文总评论数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_actions_post_shares_total": {
        "column_comment": "主页帖文总转发数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fan_adds_by_paid_non_paid_unique_total": {
        "column_comment": "新增粉丝来源（总量）",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_act_thousand_fans": {
        "column_comment": "千粉互动",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_act_per_post": {
        "column_comment": "单帖互动数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fan_adds_by_paid_non_paid_unique_unpaid": {
        "column_comment": "新增粉丝来源（自然）",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_unlike_source_unique_uppnf": {
        "column_comment": "粉丝流失方式_Unlikes from Page; Posts; or News Feed",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_unlike_source_unique_sar": {
        "column_comment": "粉丝流失方式_Suspicious Account Removals",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_unlike_source_unique_ups": {
        "column_comment": "粉丝流失方式_Unlikes from Page Suggestions",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_unlike_source_unique_uar": {
        "column_comment": "粉丝流失方式_Underage Account Removals",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_unlike_source_unique_us": {
        "column_comment": "粉丝流失方式_Unlikes from Search",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_fans_by_unlike_source_unique_other": {
        "column_comment": "粉丝流失方式_Other",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_fans_diff": {
        "column_comment": "粉丝净增长数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_posts_impressions": {
        "column_comment": "帖文曝光次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_posts_impressions_organic": {
        "column_comment": "帖文自然曝光",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_posts_impressions_paid": {
        "column_comment": "帖文付费曝光",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_posts_impressions_unique": {
        "column_comment": "帖文覆盖人数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_posts_impressions_organic_unique": {
        "column_comment": "帖文自然覆盖",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_posts_impressions_paid_unique": {
        "column_comment": "帖文付费覆盖",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "carousel_album_impressions": {
        "column_comment": "轮播图相册曝光次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "carousel_album_reach": {
        "column_comment": "轮播图相册覆盖人数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "carousel_album_saved": {
        "column_comment": "轮播图相册收藏人数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_post_active": {
        "column_comment": "帖文互动数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_page_active": {
        "column_comment": "主页所有帖文互动数(tiktok授权转赞评相加)",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "post_act_per_fans": {
        "column_comment": "帖文互动率（按公开粉丝）",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_post_act_per_fans": {
        "column_comment": "帖文互动率（按授权粉丝）",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_post_act_per_impressions": {
        "column_comment": "帖文互动率（按曝光）",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_post_act_per_reach": {
        "column_comment": "帖文互动率（按覆盖）",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_view_time": {
        "column_comment": "视频观看时长(原始)",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views": {
        "column_comment": "视频观看次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_view_time_minute": {
        "column_comment": "视频观看时长(分钟)",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "insight_saved": {
        "column_comment": "帖文收藏人数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views_by_paid_non_paid_unpaid": {
        "column_comment": "视频观看来源_unpaid",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "video_watched_rate_per_post": {
        "column_comment": "单帖视频平均完播率",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views_autoplayed": {
        "column_comment": "自动播放次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views_10s": {
        "column_comment": "观看达10秒的次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_complete_views_30s": {
        "column_comment": "观看达30秒的次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views_paid": {
        "column_comment": "付费观看次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views_10s_paid": {
        "column_comment": "付费观看达10秒的次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_complete_views_30s_paid": {
        "column_comment": "付费观看达30秒的次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views_organic": {
        "column_comment": "自然观看次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_views_10s_organic": {
        "column_comment": "自然观看达10秒的次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
    "page_video_complete_views_30s_organic": {
        "column_comment": "自然观看达30秒的次数",
        "table_name": "social_page_summary_insight",
        "date_source": "mysql",
        "is_last_sum": False,
        "is_last_date": False,
    },
}

# social_page_insight&social_page_insight_linkedin 指标
SOCIAL_PAGE_INSIGHT = {
    # fb 粉丝性别年龄分布
    "page_fans_gender_age": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # fb 粉丝语言
    "page_fans_locale": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # fb 粉丝国家
    "page_fans_country": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # fb 粉丝城市
    "page_fans_city": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # fb 粉丝在线时长
    "page_fans_online": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": False,
    },
    # ins 粉丝性别年龄分布
    "audience_gender_age": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # ins 粉丝国家
    "audience_country": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # ins 粉丝城市
    "audience_city": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # ins 粉丝在线时长
    "online_followers": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": False,
    },
    # linkedin 粉丝国家分布
    "followerCountsByCountry": {
        "table_name": "social_page_insight_linkedin",
        "date_source": "mysql",
        "date_field": "day",
        "is_last_sum": False,
        "is_last_date": True,
        "insight_name_name": "classify_name",
        "insight_key_name": "classify_value",
    },
    # linkedin 粉丝功能分布*
    "followerCountsByFunction": {
        "table_name": "social_page_insight_linkedin",
        "date_source": "mysql",
        "date_field": "day",
        "is_last_sum": False,
        "is_last_date": True,
        "insight_name_name": "classify_name",
        "insight_key_name": "classify_value",
    },
    # linkedin 粉丝关联类型分布*
    "followerCountsByAssociationType": {
        "table_name": "social_page_insight_linkedin",
        "date_source": "mysql",
        "date_field": "day",
        "is_last_sum": False,
        "is_last_date": True,
        "insight_name_name": "classify_name",
        "insight_key_name": "classify_value",
    },
    # linkedin 粉丝资历分布*
    "followerCountsBySeniority": {
        "table_name": "social_page_insight_linkedin",
        "date_source": "mysql",
        "date_field": "day",
        "is_last_sum": False,
        "is_last_date": True,
        "insight_name_name": "classify_name",
        "insight_key_name": "classify_value",
    },
    # linkedin 粉丝地区分布
    "followerCountsByRegion": {
        "table_name": "social_page_insight_linkedin",
        "date_source": "mysql",
        "date_field": "day",
        "is_last_sum": False,
        "is_last_date": True,
        "insight_name_name": "classify_name",
        "insight_key_name": "classify_value",
    },
    # linkedin 粉丝行业分布
    "followerCountsByIndustry": {
        "table_name": "social_page_insight_linkedin",
        "date_source": "mysql",
        "date_field": "day",
        "is_last_sum": False,
        "is_last_date": True,
        "insight_name_name": "classify_name",
        "insight_key_name": "classify_value",
    },
    # linkedin 粉丝员工规模分布*
    "followerCountsByStaffCountRange": {
        "table_name": "social_page_insight_linkedin",
        "date_source": "mysql",
        "date_field": "day",
        "is_last_sum": False,
        "is_last_date": True,
        "insight_name_name": "classify_name",
        "insight_key_name": "classify_value",
    },
    # tiktok 粉丝分析-在线时长
    "audience_activity": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": False,
    },
    # tiktok 粉丝分析-粉丝国家
    "audience_countries": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
    # tiktok 粉丝分析-粉丝性别
    "audience_genders": {
        "table_name": "social_page_insight",
        "date_source": "mysql",
        "date_field": "date",
        "is_last_sum": False,
        "is_last_date": True,
    },
}

FIELD_SETTINGS = {
    **SOCIAL_PAGE_SUMMARY,
    **SOCIAL_PAGE_SUMMARY_INSIGHT,
    **SOCIAL_PAGE_INSIGHT,
}

if __name__ == "__main__":
    print(
        SOCIAL_PAGE_SUMMARY.__len__()
        + SOCIAL_PAGE_SUMMARY_INSIGHT.__len__()
        + SOCIAL_PAGE_INSIGHT.__len__()
    )
    print(FIELD_SETTINGS.__len__())
