<?xml version="1.0"?>
<!--
/**
 * @package     Plumrocket_SizeChart
 * @copyright   Copyright (c) 2022 Plumrocket Inc. (https://plumrocket.com)
 * @license     https://plumrocket.com/license   End-user License Agreement
 */
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="plumrocket_sizechart" resource="default" engine="innodb" comment="Size Chart">
        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Size Chart Id"/>
        <column xsi:type="varchar" name="name" nullable="false" length="255" comment="Size Chart Title"/>
        <column xsi:type="varchar" name="button_label" length="255" nullable="false" comment="Button label"/>
        <column xsi:type="mediumtext" name="content" comment="Size Chart Content"/>
        <column xsi:type="smallint" name="display_type" padding="6" unsigned="false" nullable="false" identity="false"
                comment="Size Chart Display Type"/>
        <column xsi:type="smallint" name="status" padding="6" unsigned="false" nullable="false" identity="false" default="1"
                comment="Is Size Chart Active"/>
        <column xsi:type="datetime" name="updated_at" default="NULL" comment="Size Chart Modification Time"/>
        <column xsi:type="datetime" name="created_at" default="NULL" comment="Size Chart Creation Time"/>
        <column xsi:type="boolean" name="conditions_is_main" nullable="false" default="0"
                comment="Override Catalog And Product Settings"/>
        <column xsi:type="int" name="conditions_priority" padding="10" unsigned="true" nullable="false" comment="Rules Priority"/>
        <column xsi:type="mediumtext" name="conditions_serialized" nullable="false" comment="Conditions Serialized"/>
        <column xsi:type="varchar" name="store_id" length="255" nullable="false" default="0" comment="Store ID"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
        <index referenceId="PLUMROCKET_SIZECHART_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
</schema>
