<?xml version="1.0"?>
<!--
/**
 * CedCommerce
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the End User License Agreement (EULA)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://cedcommerce.com/license-agreement.txt
 *
 * @category    Ced
 * @package     Ced_PwaNotifications
 * @author 		CedCommerce Core Team <connect@cedcommerce.com>
 * @copyright   Copyright CedCommerce (http://cedcommerce.com/)
 * @license      http://cedcommerce.com/license-agreement.txt
 */
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="ced_pwa_user_tokens" resource="default" engine="innodb" comment="Draft Order">
        <column xsi:type="smallint" name="id" padding="6" unsigned="false" nullable="false" identity="true"
                comment="Entity ID"/>

        <column xsi:type="varchar" name="token" nullable="false" length="255" comment="Token"/>
        <column xsi:type="varchar" name="browser" nullable="false" length="255" comment="Browser"/>
        <column xsi:type="timestamp" name="creation_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
                comment="Creation Time"/>
        <column xsi:type="timestamp" name="update_time" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
                comment="Modification Time"/>
       
        <column xsi:type="int" name="customer_id" padding="20" unsigned="false" nullable="false" identity="false"
                default="0" comment="Customer Id"/>
        <column xsi:type="int" name="vendor_id" padding="20" unsigned="false" nullable="false" identity="false"
                default="0" comment="Vendor Id"/>
        <column xsi:type="varchar" name="customer_name" nullable="false" length="255" comment="Customer Name"/>
        <column xsi:type="varchar" name="version" nullable="false" length="255" comment="version"/>
        <column xsi:type="varchar" name="user_type" nullable="false" length="255" comment="user_type"/>
        <column xsi:type="varchar" name="user_id" nullable="false" length="255" comment="user_id"/>
         <column xsi:type="varchar" name="email" nullable="false" length="255" comment="email"/>

        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
        <index referenceId="PWA_TOKENS_TOKEN" indexType="fulltext">
            <column name="token"/>
        </index>
    </table>

    <table name="ced_pwa_notifications_templates" resource="default" engine="innodb" comment="Draft Order">
        <column xsi:type="smallint" name="id" padding="6" unsigned="false" nullable="false" identity="true"
                comment="Entity ID"/>
        <column xsi:type="varchar" name="status" nullable="false" length="20" comment="Status"/>
        <column xsi:type="varchar" name="title" nullable="false" length="255" comment="title"/>
        <column xsi:type="timestamp" name="creation_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
                comment="Creation Time"/>
        <column xsi:type="timestamp" name="update_time" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
                comment="Modification Time"/>
        <column xsi:type="varchar" name="body" nullable="false" length="255" comment="body"/>
        <column xsi:type="varchar" name="action_url" nullable="false" length="255" comment="Action Url"/>
        <column xsi:type="varchar" name="icon" nullable="false" length="255" comment="icon"/>
       
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
        <index referenceId="PWA_NOTIFICATION_TEMPLATES" indexType="fulltext">
            <column name="title"/>
            <column name="status"/>
        </index>
    </table>

</schema>
