Files
2026-09-15 10:35:56 +08:00

54 lines
3.9 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_agent" resource="default" engine="innodb" comment="eSUN Agents">
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
<column xsi:type="varchar" name="system_name" nullable="false" length="255" comment="System Name"/>
<column xsi:type="varchar" name="name" nullable="false" length="255" comment="Company Name"/>
<column xsi:type="varchar" name="continent" nullable="false" length="32" comment="Continent Code"/>
<column xsi:type="varchar" name="country_code" nullable="false" length="2" comment="Country Code"/>
<column xsi:type="varchar" name="country" nullable="false" length="128" comment="Country Name"/>
<column xsi:type="varchar" name="website" nullable="false" length="1024" default="" comment="Website"/>
<column xsi:type="text" name="address" nullable="false" comment="Address"/>
<column xsi:type="varchar" name="logo" nullable="false" length="255" default="" comment="Logo Path"/>
<column xsi:type="varchar" name="note" nullable="false" length="255" default="" comment="Public Note"/>
<column xsi:type="decimal" name="map_x" nullable="true" scale="3" precision="6" comment="Map X Percent"/>
<column xsi:type="decimal" name="map_y" nullable="true" scale="3" precision="6" comment="Map Y Percent"/>
<column xsi:type="smallint" name="sort_order" unsigned="true" nullable="false" default="0" comment="Sort Order"/>
<column xsi:type="smallint" name="is_active" unsigned="true" nullable="false" default="1" comment="Is Active"/>
<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_AGENT_CONTINENT" indexType="btree">
<column name="continent"/>
</index>
<index referenceId="ESUN_AGENT_COUNTRY_CODE" indexType="btree">
<column name="country_code"/>
</index>
<index referenceId="ESUN_AGENT_IS_ACTIVE_SORT_ORDER" indexType="btree">
<column name="is_active"/>
<column name="sort_order"/>
</index>
</table>
<table name="esun_agent_application" resource="default" engine="innodb" comment="eSUN Agent Applications">
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
<column xsi:type="varchar" name="company_name" nullable="false" length="255" comment="Company Name"/>
<column xsi:type="varchar" name="contact_person" nullable="false" length="255" comment="Contact Person"/>
<column xsi:type="varchar" name="country" nullable="false" length="255" comment="Country"/>
<column xsi:type="varchar" name="email" nullable="false" length="255" comment="Email"/>
<column xsi:type="text" name="message" nullable="false" comment="Other Message"/>
<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="entity_id"/>
</constraint>
<index referenceId="ESUN_AGENT_APPLICATION_EMAIL" indexType="btree">
<column name="email"/>
</index>
<index referenceId="ESUN_AGENT_APPLICATION_CREATED_AT" indexType="btree">
<column name="created_at"/>
</index>
</table>
</schema>