<?xml version="1.0"?>
<!-- Preguntas que el chatbot no supo contestar o que fallaron, para ir mejorándolo (sin datos personales) -->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="yeboyebo_chatbot_question" resource="default" engine="innodb" comment="Chatbot: preguntas sin respuesta o con error">
        <column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true"/>
        <column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" default="0"/>
        <column xsi:type="varchar" name="type" length="20" nullable="false" comment="unanswered | error"/>
        <column xsi:type="text" name="question" nullable="false" comment="Pregunta anonimizada"/>
        <column xsi:type="varchar" name="conversation" length="64" nullable="true" comment="Hash de la conversación"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="entity_id"/>
        </constraint>
        <index referenceId="YEBOYEBO_CHATBOT_QUESTION_CREATED_AT" indexType="btree">
            <column name="created_at"/>
        </index>
        <index referenceId="YEBOYEBO_CHATBOT_QUESTION_STORE_ID_TYPE" indexType="btree">
            <column name="store_id"/>
            <column name="type"/>
        </index>
    </table>
</schema>
