"""empty message

Revision ID: d0c6dc7e5a90
Revises: 
Create Date: 2020-09-07 16:26:20.707749

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd0c6dc7e5a90'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('board_preview_data',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键'),
    sa.Column('tenant_id', sa.Integer(), nullable=True, comment='租户id'),
    sa.Column('robot_id', sa.Integer(), nullable=True, comment='机器人id'),
    sa.Column('visitor_counts', sa.Integer(), nullable=True, comment='接待人次'),
    sa.Column('conversation_rounds', sa.Integer(), nullable=True, comment='对话轮次'),
    sa.Column('conversation_average', sa.Float(), nullable=True, comment='会话平均轮次'),
    sa.Column('solve_counts', sa.Integer(), nullable=True, comment='解决接待量'),
    sa.Column('unsolved_rate', sa.Float(), nullable=True, comment='未解决率'),
    sa.Column('knowledge_hit', sa.Integer(), nullable=True, comment='知识命中'),
    sa.Column('no_answer_rate', sa.Float(), nullable=True, comment='无答案率'),
    sa.Column('solve_rate', sa.Float(), nullable=True, comment='解决率'),
    sa.Column('knowledge_dia_counts', sa.Integer(), nullable=True, comment='知识对话轮次'),
    sa.Column('dialogue_counts', sa.Integer(), nullable=True, comment='对话工厂对话轮次'),
    sa.Column('recommend_dia_counts', sa.Integer(), nullable=True, comment='推荐对话轮次'),
    sa.Column('opt_by', sa.String(length=128), nullable=True, comment='操作人'),
    sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
    sa.Column('update_time', sa.TIMESTAMP(), nullable=True, comment='修改时间'),
    sa.Column('status', sa.Boolean(), nullable=True, comment='是否有效数据'),
    sa.PrimaryKeyConstraint('id'),
    comment='数据看板--数据概览'
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('board_preview_data')
    # ### end Alembic commands ###
