Files
sterivein/local/config/schema.xml
2012-12-17 17:39:25 +01:00

1154 lines
71 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--Autogenerated by PropelSchemaReverseTask class.-->
<database name="thelia" defaultIdMethod="native" namespace="Thelia\Model">
<table name="accessory" phpName="Accessory" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" required="true"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="true"/>
<column name="accessory" phpName="Accessory" type="INTEGER" required="true"/>
<column name="position" phpName="Position" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="product" name="fk_accessory_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="product" name="fk_accessory_accessory" onDelete="CASCADE">
<reference local="accessory" foreign="id"/>
</foreign-key>
<index name="idx_address_product_id">
<index-column name="product_id"/>
</index>
<index name="idx_address_accessory">
<index-column name="accessory"/>
</index>
</table>
<table name="address" phpName="Address" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="customer_id" phpName="CustomerId" type="INTEGER" required="true"/>
<column name="customer_title_id" phpName="CustomerTitleId" type="INTEGER" required="false"/>
<column name="company" phpName="Company" type="VARCHAR" size="255" required="false"/>
<column name="firstname" phpName="Firstname" type="VARCHAR" size="255" required="true"/>
<column name="lastname" phpName="Lastname" type="VARCHAR" size="255" required="true"/>
<column name="address1" phpName="Address1" type="VARCHAR" size="255" required="true"/>
<column name="address2" phpName="Address2" type="VARCHAR" size="255" required="true"/>
<column name="address3" phpName="Address3" type="VARCHAR" size="255" required="true"/>
<column name="zipcode" phpName="Zipcode" type="VARCHAR" size="10" required="true"/>
<column name="city" phpName="City" type="VARCHAR" size="255" required="true"/>
<column name="country_id" phpName="CountryId" type="INTEGER" required="true"/>
<column name="phone" phpName="Phone" type="VARCHAR" size="20" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="customer" name="fk_address_customer_id" onDelete="CASCADE">
<reference local="customer_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="customer_title" name="fk_address_customer_title_id">
<reference local="customer_title_id" foreign="id"/>
</foreign-key>
<index name="idx_address_customer_id">
<index-column name="customer_id"/>
</index>
<index name="idx_address_customer_title_id">
<index-column name="customer_title_id"/>
</index>
</table>
<table name="admin" phpName="Admin" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="firstname" phpName="Firstname" type="VARCHAR" size="100" required="true"/>
<column name="lastname" phpName="Lastname" type="VARCHAR" size="100" required="true"/>
<column name="login" phpName="Login" type="VARCHAR" size="100" required="true"/>
<column name="password" phpName="Password" type="VARCHAR" size="128" required="true"/>
<column name="algo" phpName="Algo" type="VARCHAR" size="128" required="false"/>
<column name="salt" phpName="Salt" type="VARCHAR" size="128" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="admin_group" phpName="AdminGroup" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="group_id" phpName="GroupId" type="INTEGER" required="false"/>
<column name="admin_id" phpName="AdminId" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="group" name="fk_admin_group_group_id" onDelete="CASCADE">
<reference local="group_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="admin" name="fk_admin_group_admin_id" onDelete="CASCADE">
<reference local="admin_id" foreign="id"/>
</foreign-key>
<index name="idx_admin_group_group_id">
<index-column name="group_id"/>
</index>
<index name="idx_admin_group_admin_id">
<index-column name="admin_id"/>
</index>
</table>
<table name="admin_log" phpName="AdminLog" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="admin_login" phpName="AdminLogin" type="VARCHAR" size="255" required="false"/>
<column name="admin_firstname" phpName="AdminFirstname" type="VARCHAR" size="255" required="false"/>
<column name="admin_lastname" phpName="AdminLastname" type="VARCHAR" size="255" required="false"/>
<column name="action" phpName="Action" type="VARCHAR" size="255" required="false"/>
<column name="request" phpName="Request" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="area" phpName="Area" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="name" phpName="Name" type="VARCHAR" size="100" required="true"/>
<column name="unit" phpName="Unit" type="FLOAT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="attribute" phpName="Attribute" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="attribute_av" phpName="AttributeAv" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="attribute_id" phpName="AttributeId" type="INTEGER" required="true"/>
<column name="position" phpName="Position" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="attribute" name="fk_attribute_av_attribute_id" onDelete="CASCADE">
<reference local="attribute_id" foreign="id"/>
</foreign-key>
<index name="idx_attribute_av_attribute_id">
<index-column name="attribute_id"/>
</index>
</table>
<table name="attribute_av_desc" phpName="AttributeAvDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="attribute_av_id" phpName="AttributeAvId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="attribute_av" name="fk_attribute_av_desc_attribute_av_id" onDelete="CASCADE">
<reference local="attribute_av_id" foreign="id"/>
</foreign-key>
<index name="idx_attribute_av_desc_attribute_av_id">
<index-column name="attribute_av_id"/>
</index>
</table>
<table name="attribute_category" phpName="AttributeCategory" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" required="true"/>
<column name="attribute_id" phpName="AttributeId" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="category" name="fk_attribute_category_category_id" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="attribute" name="fk_attribute_category_attribute_id" onDelete="CASCADE">
<reference local="attribute_id" foreign="id"/>
</foreign-key>
<index name="idx_attribute_category_category_id">
<index-column name="category_id"/>
</index>
<index name="idx_attribute_category_attribute_id">
<index-column name="attribute_id"/>
</index>
</table>
<table name="attribute_combination" phpName="AttributeCombination" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="attribute_id" phpName="AttributeId" type="INTEGER" primaryKey="true" required="true"/>
<column name="combination_id" phpName="CombinationId" type="INTEGER" primaryKey="true" required="true"/>
<column name="attribute_av_id" phpName="AttributeAvId" type="INTEGER" primaryKey="true" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_At" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="attribute" name="fk_attribute_combination_attribute_id" onDelete="CASCADE">
<reference local="attribute_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="attribute_av" name="fk_attribute_combination_attribute_av_id" onDelete="CASCADE">
<reference local="attribute_av_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="combination" name="fk_attribute_combination_combination_id" onDelete="CASCADE">
<reference local="combination_id" foreign="id"/>
</foreign-key>
<index name="idx_attribute_combination_attribute_id">
<index-column name="attribute_id"/>
</index>
<index name="idx_attribute_combination_attribute_av_id">
<index-column name="attribute_av_id"/>
</index>
<index name="idx_attribute_combination_combination_id">
<index-column name="combination_id"/>
</index>
</table>
<table name="attribute_desc" phpName="AttributeDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="attribute_id" phpName="AttributeId" type="INTEGER" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="attribute" name="fk_attribute_desc_attribute_id" onDelete="CASCADE">
<reference local="attribute_id" foreign="id"/>
</foreign-key>
<index name="idx_attribute_desc_attribute_id">
<index-column name="attribute_id"/>
</index>
</table>
<table name="category" phpName="Category" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="parent" phpName="Parent" type="INTEGER" required="false"/>
<column name="link" phpName="Link" type="VARCHAR" size="255" required="false"/>
<column name="visible" phpName="Visible" type="TINYINT" required="true"/>
<column name="position" phpName="Position" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="category_desc" phpName="CategoryDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="CLOB" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="postscriptum" phpName="Postscriptum" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="category" name="fk_category_desc_category_id" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<index name="idx_category_desc_category_id">
<index-column name="category_id"/>
</index>
</table>
<table name="combination" phpName="Combination" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ref" phpName="Ref" type="VARCHAR" size="255" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="config" phpName="Config" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="name" phpName="Name" type="VARCHAR" size="255" required="true"/>
<column name="value" phpName="Value" type="VARCHAR" size="255" required="true"/>
<column name="secure" phpName="Secure" type="TINYINT" required="true" defaultValue="1"/>
<column name="hidden" phpName="Hidden" type="TINYINT" required="true" defaultValue="1"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="config_desc" phpName="ConfigDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="config_id" phpName="ConfigId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="config" name="fk_config_desc_config_id" onDelete="CASCADE">
<reference local="config_id" foreign="id"/>
</foreign-key>
<index name="idx_config_desc_config_id">
<index-column name="config_id"/>
</index>
</table>
<table name="content" phpName="Content" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="visible" phpName="Visible" type="TINYINT" required="false"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="content_assoc" phpName="ContentAssoc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" required="false"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="false"/>
<column name="content_id" phpName="ContentId" type="INTEGER" required="false"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="category" name="fk_content_assoc_category_id" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="product" name="fk_content_assoc_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="content" name="fk_content_assoc_content_id" onDelete="CASCADE">
<reference local="content_id" foreign="id"/>
</foreign-key>
<index name="idx_content_assoc_category_id">
<index-column name="category_id"/>
</index>
<index name="idx_content_assoc_product_id">
<index-column name="product_id"/>
</index>
<index name="idx_content_assoc_content_id">
<index-column name="content_id"/>
</index>
</table>
<table name="content_desc" phpName="ContentDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="content_id" phpName="ContentId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="postscriptum" phpName="Postscriptum" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="content" name="fk_content_desc_content_id" onDelete="CASCADE">
<reference local="content_id" foreign="id"/>
</foreign-key>
<index name="idx_content_desc_content_id">
<index-column name="content_id"/>
</index>
</table>
<table name="content_folder" phpName="ContentFolder" idMethod="native">
<column name="content_id" phpName="ContentId" type="INTEGER" primaryKey="true" required="true"/>
<column name="folder_id" phpName="FolderId" type="INTEGER" primaryKey="true" required="true"/>
<foreign-key foreignTable="content" name="fk_content_folder_content_id" onDelete="CASCADE">
<reference local="content_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="folder" name="fk_content_folder_folder_id" onDelete="CASCADE">
<reference local="folder_id" foreign="id"/>
</foreign-key>
<index name="idx_content_folder_content_id">
<index-column name="content_id"/>
</index>
<index name="idx_content_folder_folder_id">
<index-column name="folder_id"/>
</index>
</table>
<table name="country" phpName="Country" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" required="true"/>
<column name="area_id" phpName="AreaId" type="INTEGER" required="false"/>
<column name="isocode" phpName="Isocode" type="VARCHAR" size="4" required="true"/>
<column name="isoalpha2" phpName="Isoalpha2" type="VARCHAR" size="2" required="false"/>
<column name="isoalpha3" phpName="Isoalpha3" type="VARCHAR" size="4" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="area" name="fk_country_area_id" onDelete="SET NULL">
<reference local="area_id" foreign="id"/>
</foreign-key>
<index name="idx_country_area_id">
<index-column name="area_id"/>
</index>
</table>
<table name="country_desc" phpName="CountryDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="country_id" phpName="CountryId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="country" name="fk_country_desc_country_id" onDelete="CASCADE">
<reference local="country_id" foreign="id"/>
</foreign-key>
<index name="idx_country_desc_country_id">
<index-column name="country_id"/>
</index>
</table>
<table name="coupon" phpName="Coupon" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="45" required="true"/>
<column name="action" phpName="Action" type="VARCHAR" size="255" required="true"/>
<column name="value" phpName="Value" type="FLOAT" required="true"/>
<column name="used" phpName="Used" type="TINYINT" required="false"/>
<column name="available_since" phpName="AvailableSince" type="TIMESTAMP" required="false"/>
<column name="date_limit" phpName="DateLimit" type="TIMESTAMP" required="false"/>
<column name="activate" phpName="Activate" type="TINYINT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<unique name="code_UNIQUE">
<unique-column name="code"/>
</unique>
</table>
<table name="coupon_order" phpName="CouponOrder" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="order_id" phpName="OrderId" type="INTEGER" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="45" required="true"/>
<column name="value" phpName="Value" type="FLOAT" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="order" name="fk_coupon_order_order_id" onDelete="CASCADE">
<reference local="order_id" foreign="id"/>
</foreign-key>
<index name="idx_coupon_order_order_id">
<index-column name="order_id"/>
</index>
</table>
<table name="coupon_rule" phpName="CouponRule" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="coupon_id" phpName="CouponId" type="INTEGER" required="true"/>
<column name="controller" phpName="Controller" type="VARCHAR" size="255" required="false"/>
<column name="operation" phpName="Operation" type="VARCHAR" size="255" required="false"/>
<column name="value" phpName="Value" type="FLOAT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="coupon" name="fk_coupon_rule_coupon_id" onDelete="CASCADE">
<reference local="coupon_id" foreign="id"/>
</foreign-key>
<index name="idx_coupon_rule_coupon_id">
<index-column name="coupon_id"/>
</index>
</table>
<table name="currency" phpName="Currency" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="name" phpName="Name" type="VARCHAR" size="45" required="false"/>
<column name="code" phpName="Code" type="VARCHAR" size="45" required="false"/>
<column name="symbol" phpName="Symbol" type="VARCHAR" size="45" required="false"/>
<column name="rate" phpName="Rate" type="FLOAT" required="false"/>
<column name="default_utility" phpName="DefaultUtility" type="TINYINT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="customer" phpName="Customer" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ref" phpName="Ref" type="VARCHAR" size="50" required="true"/>
<column name="customer_title_id" phpName="CustomerTitleId" type="INTEGER" required="false"/>
<column name="company" phpName="Company" type="VARCHAR" size="255" required="false"/>
<column name="firstname" phpName="Firstname" type="VARCHAR" size="255" required="true"/>
<column name="lastname" phpName="Lastname" type="VARCHAR" size="255" required="true"/>
<column name="address1" phpName="Address1" type="VARCHAR" size="255" required="true"/>
<column name="address2" phpName="Address2" type="VARCHAR" size="255" required="false"/>
<column name="address3" phpName="Address3" type="VARCHAR" size="255" required="false"/>
<column name="zipcode" phpName="Zipcode" type="VARCHAR" size="10" required="false"/>
<column name="city" phpName="City" type="VARCHAR" size="255" required="true"/>
<column name="country_id" phpName="CountryId" type="INTEGER" required="true"/>
<column name="phone" phpName="Phone" type="VARCHAR" size="20" required="false"/>
<column name="cellphone" phpName="Cellphone" type="VARCHAR" size="20" required="false"/>
<column name="email" phpName="Email" type="VARCHAR" size="50" required="false"/>
<column name="password" phpName="Password" type="VARCHAR" size="255" required="false"/>
<column name="algo" phpName="Algo" type="VARCHAR" size="128" required="false"/>
<column name="salt" phpName="Salt" type="VARCHAR" size="128" required="false"/>
<column name="reseller" phpName="Reseller" type="TINYINT" required="false"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="false"/>
<column name="sponsor" phpName="Sponsor" type="VARCHAR" size="50" required="false"/>
<column name="discount" phpName="Discount" type="FLOAT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="customer_title" name="fk_customer_customer_title_id" onDelete="SET NULL">
<reference local="customer_title_id" foreign="id"/>
</foreign-key>
<unique name="ref_UNIQUE">
<unique-column name="ref"/>
</unique>
<index name="idx_customer_customer_title_id">
<index-column name="customer_title_id"/>
</index>
</table>
<table name="customer_title" phpName="CustomerTitle" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="default_utility" phpName="DefaultUtility" type="INTEGER" required="true" defaultValue="0"/>
<column name="position" phpName="Position" type="VARCHAR" size="45" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="customer_title_desc" phpName="CustomerTitleDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="customer_title_id" phpName="CustomerTitleId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="short" phpName="Short" type="VARCHAR" size="10" required="false"/>
<column name="long" phpName="Long" type="VARCHAR" size="45" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="customer_title" name="fk_customer_title_desc_customer_title_id" onDelete="CASCADE">
<reference local="customer_title_id" foreign="id"/>
</foreign-key>
<index name="idx_customer_title_desc_customer_title_id">
<index-column name="customer_title_id"/>
</index>
</table>
<table name="delivzone" phpName="Delivzone" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="area_id" phpName="AreaId" type="INTEGER" required="false"/>
<column name="delivery" phpName="Delivery" type="VARCHAR" size="45" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="area" name="fk_delivzone_area_id" onDelete="SET NULL">
<reference local="area_id" foreign="id"/>
</foreign-key>
<index name="idx_delivzone_area_id">
<index-column name="area_id"/>
</index>
</table>
<table name="document" phpName="Document" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="false"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" required="false"/>
<column name="folder_id" phpName="FolderId" type="INTEGER" required="false"/>
<column name="content_id" phpName="ContentId" type="INTEGER" required="false"/>
<column name="file" phpName="File" type="VARCHAR" size="255" required="true"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="product" name="fk_document_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="category" name="fk_document_category_id" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="content" name="fk_document_content_id" onDelete="CASCADE">
<reference local="content_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="folder" name="fk_document_folder_id" onDelete="CASCADE">
<reference local="folder_id" foreign="id"/>
</foreign-key>
<index name="idx_document_product_id">
<index-column name="product_id"/>
</index>
<index name="idx_document_category_id">
<index-column name="category_id"/>
</index>
<index name="idx_document_content_id">
<index-column name="content_id"/>
</index>
<index name="idx_document_folder_id">
<index-column name="folder_id"/>
</index>
</table>
<table name="document_desc" phpName="DocumentDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="document_id" phpName="DocumentId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="document" name="fk_document_desc_document_id" onDelete="CASCADE">
<reference local="document_id" foreign="id"/>
</foreign-key>
<index name="idx_document_desc_document_id">
<index-column name="document_id"/>
</index>
</table>
<table name="feature" phpName="Feature" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="visible" phpName="Visible" type="INTEGER" required="false" defaultValue="0"/>
<column name="position" phpName="Position" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="feature_av" phpName="FeatureAv" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="feature_id" phpName="FeatureId" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="feature" name="fk_feature_av_feature_id" onDelete="CASCADE">
<reference local="feature_id" foreign="id"/>
</foreign-key>
<index name="idx_feature_av_feature_id">
<index-column name="feature_id"/>
</index>
</table>
<table name="feature_av_desc" phpName="FeatureAvDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="feature_av_id" phpName="FeatureAvId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="true"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="true"/>
<foreign-key foreignTable="feature_av" name="fk_feature_av_desc_feature_av_id" onDelete="CASCADE">
<reference local="feature_av_id" foreign="id"/>
</foreign-key>
<index name="idx_feature_av_desc_feature_av_id">
<index-column name="feature_av_id"/>
</index>
</table>
<table name="feature_category" phpName="FeatureCategory" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="feature_id" phpName="FeatureId" type="INTEGER" required="true"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="category" name="fk_feature_category_category_id" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="feature" name="fk_feature_category_feature_id" onDelete="CASCADE">
<reference local="feature_id" foreign="id"/>
</foreign-key>
<index name="idx_feature_category_category_id">
<index-column name="category_id"/>
</index>
<index name="idx_feature_category_feature_id">
<index-column name="feature_id"/>
</index>
</table>
<table name="feature_desc" phpName="FeatureDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="feature_id" phpName="FeatureId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="VARCHAR" size="45" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="feature" name="fk_feature_desc_feature_id" onDelete="CASCADE">
<reference local="feature_id" foreign="id"/>
</foreign-key>
<index name="idx_feature_desc_feature_id">
<index-column name="feature_id"/>
</index>
</table>
<table name="feature_prod" phpName="FeatureProd" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="true"/>
<column name="feature_id" phpName="FeatureId" type="INTEGER" required="true"/>
<column name="feature_av_id" phpName="FeatureAvId" type="INTEGER" required="false"/>
<column name="default_utility" phpName="DefaultUtility" type="VARCHAR" size="255" required="false"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="feature_av" name="fk_feature_prod_feature_av_id" onDelete="CASCADE">
<reference local="feature_av_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="feature" name="fk_feature_prod_feature_id" onDelete="CASCADE">
<reference local="feature_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="product" name="fk_feature_prod_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<index name="idx_feature_prod_product_id">
<index-column name="product_id"/>
</index>
<index name="idx_feature_prod_feature_id">
<index-column name="feature_id"/>
</index>
<index name="idx_feature_prod_feature_av_id">
<index-column name="feature_av_id"/>
</index>
</table>
<table name="folder" phpName="Folder" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="parent" phpName="Parent" type="INTEGER" required="true"/>
<column name="link" phpName="Link" type="VARCHAR" size="255" required="false"/>
<column name="visible" phpName="Visible" type="TINYINT" required="false"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="folder_desc" phpName="FolderDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="folder_id" phpName="FolderId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="postscriptum" phpName="Postscriptum" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="folder" name="fk_folder_desc_folder_id" onDelete="CASCADE">
<reference local="folder_id" foreign="id"/>
</foreign-key>
<index name="idx_folder_desc_folder_id">
<index-column name="folder_id"/>
</index>
</table>
<table name="group" phpName="Group" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="30" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<unique name="code_UNIQUE">
<unique-column name="code"/>
</unique>
</table>
<table name="group_desc" phpName="GroupDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" required="true"/>
<column name="group_id" phpName="GroupId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="group" name="fk_group_desc_group_id" onDelete="CASCADE">
<reference local="group_id" foreign="id"/>
</foreign-key>
<index name="idx_group_desc_group_id">
<index-column name="group_id"/>
</index>
</table>
<table name="group_module" phpName="GroupModule" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="group_id" phpName="GroupId" type="INTEGER" required="true"/>
<column name="module_id" phpName="ModuleId" type="INTEGER" required="false"/>
<column name="access" phpName="Access" type="TINYINT" required="false" defaultValue="0"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="group" name="fk_group_module_group_id" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="group_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="module" name="fk_group_module_module_id" onDelete="CASCADE">
<reference local="module_id" foreign="id"/>
</foreign-key>
<index name="idx_group_module_group_id">
<index-column name="group_id"/>
</index>
<index name="idx_group_module_module_id">
<index-column name="module_id"/>
</index>
</table>
<table name="group_resource" phpName="GroupResource" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="group_id" phpName="GroupId" type="INTEGER" required="true"/>
<column name="resource_id" phpName="ResourceId" type="INTEGER" required="true"/>
<column name="read" phpName="Read" type="TINYINT" required="false" defaultValue="0"/>
<column name="write" phpName="Write" type="TINYINT" required="false" defaultValue="0"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="group" name="fk_group_resource_group_id" onDelete="CASCADE">
<reference local="group_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="resource" name="fk_group_resource_resource_id" onDelete="CASCADE">
<reference local="resource_id" foreign="id"/>
</foreign-key>
<index name="idx_group_resource_resource_id">
<index-column name="resource_id"/>
</index>
<index name="idx_group_resource_group_id">
<index-column name="group_id"/>
</index>
</table>
<table name="image" phpName="Image" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="false"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" required="false"/>
<column name="folder_id" phpName="FolderId" type="INTEGER" required="false"/>
<column name="content_id" phpName="ContentId" type="INTEGER" required="false"/>
<column name="file" phpName="File" type="VARCHAR" size="255" required="true"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="product" name="fk_image_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="category" name="fk_image_category_id" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="content" name="fk_image_content_id" onDelete="CASCADE">
<reference local="content_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="folder" name="fk_image_folder_id" onDelete="CASCADE">
<reference local="folder_id" foreign="id"/>
</foreign-key>
<index name="idx_image_product_id">
<index-column name="product_id"/>
</index>
<index name="idx_image_category_id">
<index-column name="category_id"/>
</index>
<index name="idx_image_content_id">
<index-column name="content_id"/>
</index>
<index name="idx_image_folder_id">
<index-column name="folder_id"/>
</index>
</table>
<table name="image_desc" phpName="ImageDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="image_id" phpName="ImageId" type="INTEGER" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<foreign-key foreignTable="image" name="fk_image_desc_image_id" onDelete="CASCADE">
<reference local="image_id" foreign="id"/>
</foreign-key>
<index name="idx_image_desc_image_id">
<index-column name="image_id"/>
</index>
</table>
<table name="lang" phpName="Lang" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="100" required="false"/>
<column name="code" phpName="Code" type="VARCHAR" size="10" required="false"/>
<column name="url" phpName="Url" type="VARCHAR" size="255" required="false"/>
<column name="default_utility" phpName="DefaultUtility" type="TINYINT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="message" phpName="Message" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="45" required="true"/>
<column name="secure" phpName="Secure" type="TINYINT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="message_desc" phpName="MessageDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="message_id" phpName="MessageId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="45" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="description_html" phpName="DescriptionHtml" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="VARCHAR" size="45" required="true"/>
<foreign-key foreignTable="message" name="fk_message_desc_message_id" onDelete="CASCADE">
<reference local="message_id" foreign="id"/>
</foreign-key>
<index name="idx_message_desc_message_id">
<index-column name="message_id"/>
</index>
</table>
<table name="module" phpName="Module" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="55" required="true"/>
<column name="type" phpName="Type" type="TINYINT" required="true"/>
<column name="activate" phpName="Activate" type="TINYINT" required="false"/>
<column name="position" phpName="Position" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<unique name="code_UNIQUE">
<unique-column name="code"/>
</unique>
</table>
<table name="module_desc" phpName="ModuleDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="module_id" phpName="ModuleId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="currency_id" phpName="CurrencyId" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="module" name="fk_module_desc_module_id" onDelete="CASCADE">
<reference local="module_id" foreign="id"/>
</foreign-key>
<index name="idx_module_desc_module_id">
<index-column name="module_id"/>
</index>
</table>
<table name="order" phpName="Order" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="ref" phpName="Ref" type="VARCHAR" size="45" required="false"/>
<column name="customer_id" phpName="CustomerId" type="INTEGER" required="true"/>
<column name="address_invoice" phpName="AddressInvoice" type="INTEGER" required="false"/>
<column name="address_delivery" phpName="AddressDelivery" type="INTEGER" required="false"/>
<column name="invoice_date" phpName="InvoiceDate" type="DATE" required="false"/>
<column name="currency_id" phpName="CurrencyId" type="INTEGER" required="false"/>
<column name="currency_rate" phpName="CurrencyRate" type="FLOAT" required="true"/>
<column name="transaction" phpName="Transaction" type="VARCHAR" size="100" required="false"/>
<column name="delivery_num" phpName="DeliveryNum" type="VARCHAR" size="100" required="false"/>
<column name="invoice" phpName="Invoice" type="VARCHAR" size="100" required="false"/>
<column name="postage" phpName="Postage" type="FLOAT" required="false"/>
<column name="payment" phpName="Payment" type="VARCHAR" size="45" required="true"/>
<column name="carrier" phpName="Carrier" type="VARCHAR" size="45" required="true"/>
<column name="status_id" phpName="StatusId" type="INTEGER" required="false"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="currency" name="fk_order_currency_id" onDelete="SET NULL">
<reference local="currency_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="customer" name="fk_order_customer_id" onDelete="CASCADE">
<reference local="customer_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="order_address" name="fk_order_address_invoice" onDelete="SET NULL">
<reference local="address_invoice" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="order_address" name="fk_order_address_delivery" onDelete="SET NULL">
<reference local="address_delivery" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="order_status" name="fk_order_status_id" onDelete="SET NULL">
<reference local="status_id" foreign="id"/>
</foreign-key>
<index name="idx_order_currency_id">
<index-column name="currency_id"/>
</index>
<index name="idx_order_customer_id">
<index-column name="customer_id"/>
</index>
<index name="idx_order_address_invoice">
<index-column name="address_invoice"/>
</index>
<index name="idx_order_address_delivery">
<index-column name="address_delivery"/>
</index>
<index name="idx_order_status_id">
<index-column name="status_id"/>
</index>
</table>
<table name="order_address" phpName="OrderAddress" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="customer_title_id" phpName="CustomerTitleId" type="INTEGER" required="false"/>
<column name="company" phpName="Company" type="VARCHAR" size="255" required="false"/>
<column name="firstname" phpName="Firstname" type="VARCHAR" size="255" required="true"/>
<column name="lastname" phpName="Lastname" type="VARCHAR" size="255" required="true"/>
<column name="address1" phpName="Address1" type="VARCHAR" size="255" required="true"/>
<column name="address2" phpName="Address2" type="VARCHAR" size="255" required="false"/>
<column name="address3" phpName="Address3" type="VARCHAR" size="255" required="false"/>
<column name="zipcode" phpName="Zipcode" type="VARCHAR" size="10" required="true"/>
<column name="city" phpName="City" type="VARCHAR" size="255" required="true"/>
<column name="phone" phpName="Phone" type="VARCHAR" size="20" required="false"/>
<column name="country_id" phpName="CountryId" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
</table>
<table name="order_feature" phpName="OrderFeature" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="order_product_id" phpName="OrderProductId" type="INTEGER" required="true"/>
<column name="feature_desc" phpName="FeatureDesc" type="VARCHAR" size="255" required="false"/>
<column name="feature_av_desc" phpName="FeatureAvDesc" type="VARCHAR" size="255" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="order_product" name="fk_order_feature_order_product_id" onDelete="CASCADE">
<reference local="order_product_id" foreign="id"/>
</foreign-key>
<index name="idx_order_feature_order_product_id">
<index-column name="order_product_id"/>
</index>
</table>
<table name="order_product" phpName="OrderProduct" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="order_id" phpName="OrderId" type="INTEGER" required="true"/>
<column name="product_ref" phpName="ProductRef" type="VARCHAR" size="255" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="quantity" phpName="Quantity" type="FLOAT" required="true"/>
<column name="price" phpName="Price" type="FLOAT" required="true"/>
<column name="tax" phpName="Tax" type="FLOAT" required="false"/>
<column name="parent" phpName="Parent" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="order" name="fk_order_product_order_id" onDelete="CASCADE">
<reference local="order_id" foreign="id"/>
</foreign-key>
<index name="idx_order_product_order_id">
<index-column name="order_id"/>
</index>
</table>
<table name="order_status" phpName="OrderStatus" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="45" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="order_status_desc" phpName="OrderStatusDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="status_id" phpName="StatusId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="order_status" name="fk_order_status_desc_status_id" onDelete="CASCADE">
<reference local="status_id" foreign="id"/>
</foreign-key>
<index name="idx_order_status_desc_status_id">
<index-column name="status_id"/>
</index>
</table>
<table name="product" phpName="Product" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="tax_rule_id" phpName="TaxRuleId" type="INTEGER" required="false"/>
<column name="ref" phpName="Ref" type="VARCHAR" size="255" required="true"/>
<column name="price" phpName="Price" type="FLOAT" required="true"/>
<column name="price2" phpName="Price2" type="FLOAT" required="false"/>
<column name="ecotax" phpName="Ecotax" type="FLOAT" required="false"/>
<column name="newness" phpName="Newness" type="TINYINT" required="false" defaultValue="0"/>
<column name="promo" phpName="Promo" type="TINYINT" required="false" defaultValue="0"/>
<column name="quantity" phpName="Quantity" type="INTEGER" required="false" defaultValue="0"/>
<column name="visible" phpName="Visible" type="TINYINT" required="true" defaultValue="0"/>
<column name="weight" phpName="Weight" type="FLOAT" required="false"/>
<column name="position" phpName="Position" type="INTEGER" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="tax_rule" name="fk_product_tax_rule_id" onDelete="SET NULL">
<reference local="tax_rule_id" foreign="id"/>
</foreign-key>
<unique name="ref_UNIQUE">
<unique-column name="ref"/>
</unique>
<index name="idx_product_tax_rule_id">
<index-column name="tax_rule_id"/>
</index>
</table>
<table name="product_category" phpName="ProductCategory" idMethod="native">
<column name="product_id" phpName="ProductId" type="INTEGER" primaryKey="true" required="true"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" primaryKey="true" required="true"/>
<foreign-key foreignTable="product" name="fk_product_has_category_product1" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="category" name="fk_product_has_category_category1" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<index name="idx_product_has_category_category1_idx">
<index-column name="category_id"/>
</index>
<index name="idx_product_has_category_product1_idx">
<index-column name="product_id"/>
</index>
</table>
<table name="product_desc" phpName="ProductDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="CLOB" required="false"/>
<column name="chapo" phpName="Chapo" type="LONGVARCHAR" required="false"/>
<column name="postscriptum" phpName="Postscriptum" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updatet_at" phpName="UpdatetAt" type="VARCHAR" size="45" required="true"/>
<foreign-key foreignTable="product" name="fk_product_desc_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<index name="idx_product_desc_product_id">
<index-column name="product_id"/>
</index>
</table>
<table name="resource" phpName="Resource" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="30" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
<unique name="code_UNIQUE">
<unique-column name="code"/>
</unique>
</table>
<table name="resource_desc" phpName="ResourceDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="resource_id" phpName="ResourceId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="resource" name="fk_resource_desc_resource_id" onDelete="CASCADE">
<reference local="resource_id" foreign="id"/>
</foreign-key>
<index name="idx_resource_desc_resource_id">
<index-column name="resource_id"/>
</index>
</table>
<table name="rewriting" phpName="Rewriting" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" required="true"/>
<column name="url" phpName="Url" type="VARCHAR" size="255" required="true"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="false"/>
<column name="category_id" phpName="CategoryId" type="INTEGER" required="false"/>
<column name="folder_id" phpName="FolderId" type="INTEGER" required="false"/>
<column name="content_id" phpName="ContentId" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="product" name="fk_rewriting_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="category" name="fk_rewriting_category_id" onDelete="CASCADE">
<reference local="category_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="folder" name="fk_rewriting_folder_id" onDelete="CASCADE">
<reference local="folder_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="content" name="fk_rewriting_content_id" onDelete="CASCADE">
<reference local="content_id" foreign="id"/>
</foreign-key>
<index name="idx_rewriting_product_id">
<index-column name="product_id"/>
</index>
<index name="idx_rewriting_category_id">
<index-column name="category_id"/>
</index>
<index name="idx_rewriting_folder_id">
<index-column name="folder_id"/>
</index>
<index name="idx_rewriting_content_id">
<index-column name="content_id"/>
</index>
</table>
<table name="stock" phpName="Stock" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="combination_id" phpName="CombinationId" type="INTEGER" required="false"/>
<column name="product_id" phpName="ProductId" type="INTEGER" required="true"/>
<column name="increase" phpName="Increase" type="FLOAT" required="false"/>
<column name="value" phpName="Value" type="FLOAT" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="combination" name="fk_stock_combination_id" onDelete="SET NULL">
<reference local="combination_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="product" name="fk_stock_product_id" onDelete="CASCADE">
<reference local="product_id" foreign="id"/>
</foreign-key>
<index name="idx_stock_combination_id">
<index-column name="combination_id"/>
</index>
<index name="idx_stock_product_id">
<index-column name="product_id"/>
</index>
</table>
<table name="tax" phpName="Tax" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="rate" phpName="Rate" type="FLOAT" required="true"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="false"/>
</table>
<table name="tax_desc" phpName="TaxDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="tax_id" phpName="TaxId" type="INTEGER" required="true"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="true"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="tax" name="fk_tax_desc_tax_id" onDelete="CASCADE">
<reference local="tax_id" foreign="id"/>
</foreign-key>
<index name="idx_tax_desc_tax_id">
<index-column name="tax_id"/>
</index>
</table>
<table name="tax_rule" phpName="TaxRule" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="code" phpName="Code" type="VARCHAR" size="45" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
</table>
<table name="tax_rule_country" phpName="TaxRuleCountry" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" required="true"/>
<column name="tax_rule_id" phpName="TaxRuleId" type="INTEGER" required="false"/>
<column name="country_id" phpName="CountryId" type="INTEGER" required="false"/>
<column name="tax_id" phpName="TaxId" type="INTEGER" required="false"/>
<column name="none" phpName="None" type="TINYINT" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="tax" name="fk_tax_rule_country_tax_id" onDelete="SET NULL">
<reference local="tax_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="tax_rule" name="fk_tax_rule_country_tax_rule_id" onDelete="CASCADE">
<reference local="tax_rule_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="country" name="fk_tax_rule_country_country_id" onDelete="CASCADE">
<reference local="country_id" foreign="id"/>
</foreign-key>
<index name="idx_tax_rule_country_tax_id">
<index-column name="tax_id"/>
</index>
<index name="idx_tax_rule_country_tax_rule_id">
<index-column name="tax_rule_id"/>
</index>
<index name="idx_tax_rule_country_country_id">
<index-column name="country_id"/>
</index>
</table>
<table name="tax_rule_desc" phpName="TaxRuleDesc" idMethod="native">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="tax_rule_id" phpName="TaxRuleId" type="INTEGER" required="false"/>
<column name="lang" phpName="Lang" type="VARCHAR" size="10" required="false"/>
<column name="title" phpName="Title" type="VARCHAR" size="255" required="false"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="true"/>
<column name="updated_at" phpName="UpdatedAt" type="TIMESTAMP" required="true"/>
<foreign-key foreignTable="tax_rule" name="fk_tax_rule_desc_tax_rule_id" onDelete="CASCADE">
<reference local="tax_rule_id" foreign="id"/>
</foreign-key>
<index name="idx_tax_rule_desc_tax_rule_id">
<index-column name="tax_rule_id"/>
</index>
</table>
</database>