<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
  <table name="mageworx_order_base_device_data" resource="default" engine="innodb" comment="Customers Device Data Table">
    <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
    <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Order ID"/>
    <column xsi:type="int" name="device_code" padding="11" unsigned="false" nullable="true" identity="false" comment="Device Code"/>
    <column xsi:type="int" name="area_code" padding="11" unsigned="false" nullable="true" identity="false" comment="Area Code"/>
    <column xsi:type="varchar" name="device_name" nullable="true" length="64" comment="Human-readable Device Name"/>
    <column xsi:type="varchar" name="area_name" nullable="true" length="64" comment="Human-readable Area Name"/>
    <constraint xsi:type="primary" referenceId="PRIMARY">
      <column name="entity_id"/>
    </constraint>
    <constraint xsi:type="unique" referenceId="MAGEWORX_ORDER_BASE_DEVICE_DATA_ORDER_ID">
      <column name="order_id"/>
    </constraint>
    <index referenceId="MAGEWORX_ORDER_BASE_DEVICE_DATA_DEVICE_CODE" indexType="btree">
      <column name="device_code"/>
    </index>
    <index referenceId="MAGEWORX_ORDER_BASE_DEVICE_DATA_AREA_CODE" indexType="btree">
      <column name="area_code"/>
    </index>
  </table>
</schema>
