setName('cc_show'); $this->setPhpName('CcShow'); $this->setClassname('CcShow'); $this->setPackage('airtime'); $this->setUseIdGenerator(true); $this->setPrimaryKeyMethodInfo('cc_show_id_seq'); // columns $this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null); $this->addColumn('name', 'DbName', 'VARCHAR', true, 255, ''); $this->addColumn('url', 'DbUrl', 'VARCHAR', false, 255, ''); $this->addColumn('genre', 'DbGenre', 'VARCHAR', false, 255, ''); $this->addColumn('description', 'DbDescription', 'VARCHAR', false, 8192, null); $this->addColumn('color', 'DbColor', 'VARCHAR', false, 6, null); $this->addColumn('background_color', 'DbBackgroundColor', 'VARCHAR', false, 6, null); $this->addColumn('live_stream_using_airtime_auth', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, false); $this->addColumn('live_stream_using_custom_auth', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, false); $this->addColumn('live_stream_user', 'DbLiveStreamUser', 'VARCHAR', false, 255, null); $this->addColumn('live_stream_pass', 'DbLiveStreamPass', 'VARCHAR', false, 255, null); $this->addColumn('linked', 'DbLinked', 'BOOLEAN', true, null, false); $this->addColumn('is_linkable', 'DbIsLinkable', 'BOOLEAN', true, null, true); $this->addColumn('image_path', 'DbImagePath', 'VARCHAR', false, 255, ''); $this->addColumn('has_autoplaylist', 'DbHasAutoPlaylist', 'BOOLEAN', true, null, false); $this->addForeignKey('autoplaylist_id', 'DbAutoPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null); $this->addColumn('autoplaylist_repeat', 'DbAutoPlaylistRepeat', 'BOOLEAN', true, null, false); // validators } // initialize() /** * Build the RelationMap objects for this table relationships */ public function buildRelations() { $this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('autoplaylist_id' => 'id', ), 'SET NULL', null); $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowInstancess'); $this->addRelation('CcShowDays', 'CcShowDays', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowDayss'); $this->addRelation('CcShowRebroadcast', 'CcShowRebroadcast', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowRebroadcasts'); $this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowHostss'); } // buildRelations() } // CcShowTableMap