change customer model

This commit is contained in:
Manuel Raynaud
2013-07-12 16:23:06 +02:00
parent 3857827b98
commit dc22d5bf59
11 changed files with 322 additions and 1954 deletions

View File

@@ -329,35 +329,16 @@
<table name="customer" namespace="Thelia\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="ref" required="true" size="50" type="VARCHAR" />
<column name="customer_title_id" type="INTEGER" />
<column name="company" size="255" type="VARCHAR" />
<column name="firstname" required="true" size="255" type="VARCHAR" />
<column name="lastname" required="true" size="255" type="VARCHAR" />
<column name="address1" required="true" size="255" type="VARCHAR" />
<column description=" " name="address2" size="255" type="VARCHAR" />
<column name="address3" size="255" type="VARCHAR" />
<column name="zipcode" size="10" type="VARCHAR" />
<column name="city" required="true" size="255" type="VARCHAR" />
<column name="country_id" required="true" type="INTEGER" />
<column name="phone" size="20" type="VARCHAR" />
<column name="cellphone" size="20" type="VARCHAR" />
<column name="email" size="50" type="VARCHAR" />
<column name="password" size="255" type="VARCHAR" />
<column name="algo" size="128" type="VARCHAR" />
<column name="salt" size="128" type="VARCHAR" />
<column name="reseller" type="TINYINT" />
<column name="lang" size="10" type="VARCHAR" />
<column name="sponsor" size="50" type="VARCHAR" />
<column name="discount" type="FLOAT" />
<foreign-key foreignTable="customer_title" name="fk_customer_customer_title_id" onDelete="SET NULL" onUpdate="RESTRICT">
<reference foreign="id" local="customer_title_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>
<behavior name="timestampable" />
</table>
<table name="address" namespace="Thelia\Model">
@@ -375,6 +356,8 @@
<column name="city" required="true" size="255" type="VARCHAR" />
<column name="country_id" required="true" type="INTEGER" />
<column name="phone" size="20" type="VARCHAR" />
<column name="cellphone" size="20" type="VARCHAR" />
<column defaultValue="0" name="default" type="TINYINT" />
<foreign-key foreignTable="customer" name="fk_address_customer_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="customer_id" />
</foreign-key>