<?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Magento 2 Base Package
 */-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="amasty_base_instance_data" resource="default" engine="innodb" comment="Amasty Base Instance Data">
        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Record ID"/>
        <column xsi:type="varchar" name="code" nullable="false" length="255" comment="Code"/>
        <column xsi:type="mediumtext" name="value" nullable="true" comment="Value"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
        <constraint xsi:type="unique" referenceId="AMASTY_BASE_INSTANCE_DATA_CODE">
            <column name="code"/>
        </constraint>
    </table>
    <table name="amasty_base_schedule" resource="default" engine="innodb" comment="Amasty Base Data Send Schedule">
        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Record ID"/>
        <column xsi:type="varchar" name="code" nullable="false" length="255" comment="Code"/>
        <column xsi:type="int" name="last_send_date" unsigned="true" nullable="false" comment="Last Send Date Timestamp"/>
        <column xsi:type="varchar" name="time_intervals" nullable="true" length="255" comment="Time Intervals to Send"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
        <constraint xsi:type="unique" referenceId="AMASTY_BASE_SCHEDULE_CODE">
            <column name="code"/>
        </constraint>
    </table>
    <table name="amasty_base_instance_hash" resource="default" engine="innodb" comment="Amasty Base Data Send Schedule">
        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Record ID"/>
        <column xsi:type="varchar" name="code" nullable="false" length="255" comment="Code"/>
        <column xsi:type="mediumtext" name="value" nullable="true" comment="Value"/>
        <column xsi:type="datetime" name="updated_at" default="CURRENT_TIMESTAMP" nullable="false" comment="Last Send Date Timestamp"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
        <constraint xsi:type="unique" referenceId="AMASTY_BASE_INSTANCE_HASH_CODE">
            <column name="code"/>
        </constraint>
    </table>
</schema>
