43 lines
4.0 KiB
XML
43 lines
4.0 KiB
XML
<?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="esun_product_inquiry" resource="default" engine="innodb" comment="eSUN Product Inquiries">
|
|
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
|
|
<column xsi:type="int" name="parent_product_id" unsigned="true" nullable="false" comment="Parent Product ID"/>
|
|
<column xsi:type="varchar" name="parent_sku" nullable="false" length="64" comment="Parent SKU Snapshot"/>
|
|
<column xsi:type="varchar" name="parent_name" nullable="false" length="255" comment="Parent Name Snapshot"/>
|
|
<column xsi:type="int" name="product_id" unsigned="true" nullable="false" comment="Selected Product ID"/>
|
|
<column xsi:type="varchar" name="product_sku" nullable="false" length="64" comment="Selected SKU Snapshot"/>
|
|
<column xsi:type="varchar" name="product_name" nullable="false" length="255" comment="Selected Product Name Snapshot"/>
|
|
<column xsi:type="text" name="selected_options" nullable="false" comment="Selected Options Snapshot"/>
|
|
<column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" comment="Store ID"/>
|
|
<column xsi:type="smallint" name="website_id" unsigned="true" nullable="false" comment="Website ID"/>
|
|
<column xsi:type="int" name="stock_id" unsigned="true" nullable="false" comment="MSI Stock ID"/>
|
|
<column xsi:type="int" name="customer_id" unsigned="true" nullable="true" comment="Customer ID"/>
|
|
<column xsi:type="varchar" name="name" nullable="false" length="255" comment="Name"/>
|
|
<column xsi:type="varchar" name="email" nullable="false" length="255" comment="Email"/>
|
|
<column xsi:type="varchar" name="country_id" nullable="false" length="2" comment="Country Code"/>
|
|
<column xsi:type="varchar" name="country_name" nullable="false" length="255" comment="Country Name Snapshot"/>
|
|
<column xsi:type="varchar" name="company" nullable="false" length="255" default="" comment="Company Name"/>
|
|
<column xsi:type="varchar" name="telephone" nullable="false" length="64" default="" comment="Telephone"/>
|
|
<column xsi:type="text" name="message" nullable="false" comment="Message"/>
|
|
<column xsi:type="varchar" name="status" nullable="false" length="32" default="new" comment="Processing Status"/>
|
|
<column xsi:type="smallint" name="stock_status" unsigned="true" nullable="false" comment="Legacy Stock Status Snapshot"/>
|
|
<column xsi:type="smallint" name="is_salable" unsigned="true" nullable="false" comment="MSI Salable Snapshot"/>
|
|
<column xsi:type="varchar" name="availability_reason" nullable="false" length="32" comment="Availability Reason"/>
|
|
<column xsi:type="varchar" name="message_hash" nullable="false" length="64" comment="Duplicate Detection Hash"/>
|
|
<column xsi:type="varchar" name="remote_ip_hash" nullable="false" length="64" default="" comment="Rate Limit IP Hash"/>
|
|
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
|
|
<column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Updated At"/>
|
|
<constraint xsi:type="primary" referenceId="PRIMARY"><column name="entity_id"/></constraint>
|
|
<index referenceId="ESUN_PRODUCT_INQUIRY_PRODUCT_EMAIL" indexType="btree">
|
|
<column name="product_id"/><column name="email"/>
|
|
</index>
|
|
<index referenceId="ESUN_PRODUCT_INQUIRY_STATUS_CREATED" indexType="btree">
|
|
<column name="status"/><column name="created_at"/>
|
|
</index>
|
|
<index referenceId="ESUN_PRODUCT_INQUIRY_MESSAGE_HASH" indexType="btree"><column name="message_hash"/></index>
|
|
<index referenceId="ESUN_PRODUCT_INQUIRY_REMOTE_IP_HASH" indexType="btree"><column name="remote_ip_hash"/></index>
|
|
</table>
|
|
</schema>
|