# File core/lib/Thelia/Model/map/CustomerTitleTableMap.php | thelia

     1: <?php
     2:
     3: namespace Thelia\Model\map;
     4:
     5: use \RelationMap;
     6: use \TableMap;
     7:
     8:
     9: /**
    10:  * This class defines the structure of the 'customer_title' table.
    11:  *
    12:  *
    13:  *
    14:  * This map class is used by Propel to do runtime db structure discovery.
    15:  * For example, the createSelectSql() method checks the type of a given column used in an
    16:  * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
    17:  * (i.e. if it's a text column type).
    18:  *
    19:  * @package    propel.generator.Thelia.Model.map
    20:  */
    21: class CustomerTitleTableMap extends TableMap
    22: {
    23:
    24:     /**
    25:      * The (dot-path) name of this class
    26:      */
    27:     const CLASS_NAME = 'Thelia.Model.map.CustomerTitleTableMap';
    28:
    29:     /**
    30:      * Initialize the table attributes, columns and validators
    31:      * Relations are not initialized by this method since they are lazy loaded
    32:      *
    33:      * @return void
    34:      * @throws PropelException
    35:      */
    36:     public function initialize()
    37:     {
    38:         // attributes
    39:         $this->setName('customer_title');
    40:         $this->setPhpName('CustomerTitle');
    41:         $this->setClassname('Thelia\\Model\\CustomerTitle');
    42:         $this->setPackage('Thelia.Model');
    43:         $this->setUseIdGenerator(true);
    44:         // columns
    45:         $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
    46:         $this->addColumn('BY_DEFAULT', 'ByDefault', 'INTEGER', true, null, 0);
    47:         $this->addColumn('POSITION', 'Position', 'VARCHAR', true, 45, null);
    48:         $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
    49:         $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
    50:         // validators
    51:     } // initialize()
    52:
    53:     /**
    54:      * Build the RelationMap objects for this table relationships
    55:      */
    56:     public function buildRelations()
    57:     {
    58:         $this->addRelation('Customer', 'Thelia\\Model\\Customer', RelationMap::ONE_TO_MANY, array('id' => 'customer_title_id', ), 'SET NULL', 'RESTRICT', 'Customers');
    59:         $this->addRelation('Address', 'Thelia\\Model\\Address', RelationMap::ONE_TO_MANY, array('id' => 'customer_title_id', ), 'RESTRICT', 'RESTRICT', 'Addresss');
    60:         $this->addRelation('CustomerTitleI18n', 'Thelia\\Model\\CustomerTitleI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CustomerTitleI18ns');
    61:     } // buildRelations()
    62:
    63:     /**
    64:      *
    65:      * Gets the list of behaviors registered for this table
    66:      *
    67:      * @return array Associative array (name => parameters) of behaviors
    68:      */
    69:     public function getBehaviors()
    70:     {
    71:         return array(
    72:             'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
    73:             'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'short, long', 'locale_column' => 'locale', 'default_locale' => '', 'locale_alias' => '', ),
    74:         );
    75:     } // getBehaviors()
    76:
    77: } // CustomerTitleTableMap
    78: