<?xml version="1.0"?>
<!--
/**
* @author Amasty Team
* @copyright Copyright (c) 2022 Amasty (https://www.amasty.com)
* @package Cancel Orders for Magento 2
*/-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="amasty_cancel_order" resource="sales" engine="innodb" comment="Amasty Cancel Orders table">
        <column xsi:type="int" name="order_id" padding="11" unsigned="false" nullable="false" identity="false"
                comment="Order Id"/>
        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
        <column xsi:type="text" name="reason" nullable="true" comment="Cancel Reason"/>
        <column xsi:type="text" name="comment" nullable="true" comment="Comment"/>
        <column xsi:type="smallint" name="status" padding="6" unsigned="false" nullable="false" identity="false"
                default="0" comment="Status"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
                comment="Created At"/>

        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
    </table>
</schema>
