WIP Coupon
Update Coupon Model + SQL Implementattion Fixtures for Coupon and CouponFactory
This commit is contained in:
@@ -425,32 +425,6 @@
|
||||
<parameter name="log_created_by" value="true" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="content_assoc" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="category_id" type="INTEGER" />
|
||||
<column name="product_id" type="INTEGER" />
|
||||
<column name="content_id" type="INTEGER" />
|
||||
<column name="position" type="INTEGER" />
|
||||
<foreign-key foreignTable="category" name="fk_content_assoc_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="category_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="product" name="fk_content_assoc_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="product_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="content" name="fk_content_assoc_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="content_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>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="product_image" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="product_id" required="true" type="INTEGER" />
|
||||
@@ -631,7 +605,7 @@
|
||||
</behavior>
|
||||
</table>
|
||||
<table isCrossRef="true" name="accessory" namespace="Thelia\Model">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="product_id" required="true" type="INTEGER" />
|
||||
<column name="accessory" required="true" type="INTEGER" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
@@ -821,14 +795,38 @@
|
||||
<column name="title" required="true" size="255" type="VARCHAR" />
|
||||
<column name="short_description" required="true" type="LONGVARCHAR" />
|
||||
<column name="description" required="true" type="CLOB" />
|
||||
<column name="value" required="true" type="FLOAT" />
|
||||
<column name="amount" required="true" type="FLOAT" />
|
||||
<column name="is_used" required="true" type="TINYINT" />
|
||||
<column name="is_enabled" required="true" type="TINYINT" />
|
||||
<column name="expiration_date" required="true" type="TIMESTAMP" />
|
||||
<column name="serialized_rules" required="true" type="LONGVARCHAR" />
|
||||
<column name="serialized_rules_type" required="true" type="LONGVARCHAR" />
|
||||
<column name="serialized_rules_content" required="true" type="LONGVARCHAR" />
|
||||
<column name="is_cumulative" required="true" type="TINYINT" />
|
||||
<column name="is_removing_postage" required="true" type="TINYINT" />
|
||||
<unique name="code_UNIQUE">
|
||||
<unique-column name="code" />
|
||||
</unique>
|
||||
<index name="idx_is_enabled">
|
||||
<index-column name="is_enabled" />
|
||||
</index>
|
||||
<index name="idx_is_used">
|
||||
<index-column name="is_used" />
|
||||
</index>
|
||||
<index name="idx_type">
|
||||
<index-column name="type" />
|
||||
</index>
|
||||
<index name="idx_amount">
|
||||
<index-column name="amount" />
|
||||
</index>
|
||||
<index name="idx_expiration_date">
|
||||
<index-column name="expiration_date" />
|
||||
</index>
|
||||
<index name="idx_is_cumulative">
|
||||
<index-column name="is_cumulative" />
|
||||
</index>
|
||||
<index name="idx_is_removing_postage">
|
||||
<index-column name="is_removing_postage" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
<behavior name="i18n" />
|
||||
<behavior name="versionable" />
|
||||
@@ -1083,4 +1081,42 @@
|
||||
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
|
||||
</behavior>
|
||||
</table>
|
||||
<table name="product_associated_content" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="product_id" required="true" type="INTEGER" />
|
||||
<column name="content_id" required="true" type="INTEGER" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
<foreign-key foreignTable="product" name="fk_product_associated_content_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="product_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="content" name="fk_product_associated_content_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="content_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_product_associated_content_product_id">
|
||||
<index-column name="product_id" />
|
||||
</index>
|
||||
<index name="idx_product_associated_content_content_id">
|
||||
<index-column name="content_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
<table name="category_associated_content" namespace="Thelia\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="category_id" required="true" type="INTEGER" />
|
||||
<column name="content_id" required="true" type="INTEGER" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
<foreign-key foreignTable="category" name="fk_category_associated_content_category_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="category_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="content" name="fk_category_associated_content_content_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="content_id" />
|
||||
</foreign-key>
|
||||
<index name="idx_category_associated_content_category_id">
|
||||
<index-column name="category_id" />
|
||||
</index>
|
||||
<index name="idx_category_associated_content_content_id">
|
||||
<index-column name="content_id" />
|
||||
</index>
|
||||
<behavior name="timestampable" />
|
||||
</table>
|
||||
</database>
|
||||
Reference in New Issue
Block a user