1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- class CcSectionTableMap extends TableMap {
-
- const CLASS_NAME = 'airtime.map.CcSectionTableMap';
-
- public function initialize()
- {
-
- $this->setName('cc_section');
- $this->setPhpName('CcSection');
- $this->setClassname('CcSection');
- $this->setPackage('airtime');
- $this->setUseIdGenerator(true);
- $this->setPrimaryKeyMethodInfo('cc_section_id_seq');
-
- $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
- $this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
- $this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null);
- $this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', false, 6, null);
- $this->addForeignKey('CREATOR_ID', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
- $this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
- $this->addColumn('LENGTH', 'DbLength', 'VARCHAR', false, null, '00:00:00');
- $this->addColumn('TYPE', 'DbType', 'VARCHAR', false, 7, 'static');
-
- }
-
- public function buildRelations()
- {
- $this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), null, null);
- $this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'section_id', ), 'CASCADE', null);
- $this->addRelation('CcSectioncontents', 'CcSectioncontents', RelationMap::ONE_TO_MANY, array('id' => 'section_id', ), 'CASCADE', null);
- $this->addRelation('CcSectioncriteria', 'CcSectioncriteria', RelationMap::ONE_TO_MANY, array('id' => 'section_id', ), 'CASCADE', null);
- }
-
- public function getBehaviors()
- {
- return array(
- 'aggregate_column' => array('name' => 'length', 'expression' => 'SUM(cliplength)', 'foreign_table' => 'cc_sectioncontents', ),
- );
- }
- }
|