85 lines
3 KiB
PHP
85 lines
3 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace Trinity\Bundle\NewsletterBundle\Model\map;
|
||
|
|
||
|
use \RelationMap;
|
||
|
use \TableMap;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* This class defines the structure of the 'nws_model_version' table.
|
||
|
*
|
||
|
*
|
||
|
*
|
||
|
* This map class is used by Propel to do runtime db structure discovery.
|
||
|
* For example, the createSelectSql() method checks the type of a given column used in an
|
||
|
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||
|
* (i.e. if it's a text column type).
|
||
|
*
|
||
|
* @package propel.generator.vendor.trinity.src.Trinity.Bundle.NewsletterBundle.Model.map
|
||
|
*/
|
||
|
class ModelVersionTableMap extends TableMap
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* The (dot-path) name of this class
|
||
|
*/
|
||
|
const CLASS_NAME = 'vendor.trinity.src.Trinity.Bundle.NewsletterBundle.Model.map.ModelVersionTableMap';
|
||
|
|
||
|
/**
|
||
|
* Initialize the table attributes, columns and validators
|
||
|
* Relations are not initialized by this method since they are lazy loaded
|
||
|
*
|
||
|
* @return void
|
||
|
* @throws PropelException
|
||
|
*/
|
||
|
public function initialize()
|
||
|
{
|
||
|
// attributes
|
||
|
$this->setName('nws_model_version');
|
||
|
$this->setPhpName('ModelVersion');
|
||
|
$this->setClassname('Trinity\\Bundle\\NewsletterBundle\\Model\\ModelVersion');
|
||
|
$this->setPackage('vendor.trinity.src.Trinity.Bundle.NewsletterBundle.Model');
|
||
|
$this->setUseIdGenerator(false);
|
||
|
$this->setSingleTableInheritance(true);
|
||
|
// columns
|
||
|
$this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'nws_model', 'id', true, null, null);
|
||
|
$this->addColumn('name', 'Name', 'VARCHAR', true, 255, null);
|
||
|
$this->addColumn('template', 'Template', 'VARCHAR', true, 255, null);
|
||
|
$this->addColumn('class_key', 'ClassKey', 'VARCHAR', false, 255, null);
|
||
|
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||
|
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||
|
$this->addPrimaryKey('version', 'Version', 'INTEGER', true, null, 0);
|
||
|
$this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
|
||
|
$this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
|
||
|
$this->addColumn('nws_block_ids', 'NwsBlockIds', 'ARRAY', false, null, null);
|
||
|
$this->addColumn('nws_block_versions', 'NwsBlockVersions', 'ARRAY', false, null, null);
|
||
|
// validators
|
||
|
} // initialize()
|
||
|
|
||
|
/**
|
||
|
* Build the RelationMap objects for this table relationships
|
||
|
*/
|
||
|
public function buildRelations()
|
||
|
{
|
||
|
$this->addRelation('Model', 'Trinity\\Bundle\\NewsletterBundle\\Model\\Model', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||
|
} // buildRelations()
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* Gets the list of behaviors registered for this table
|
||
|
*
|
||
|
* @return array Associative array (name => parameters) of behaviors
|
||
|
*/
|
||
|
public function getBehaviors()
|
||
|
{
|
||
|
return array(
|
||
|
'event' => array (
|
||
|
),
|
||
|
'extend' => array (
|
||
|
),
|
||
|
);
|
||
|
} // getBehaviors()
|
||
|
|
||
|
} // ModelVersionTableMap
|