CcBlockcontentsTableMap.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * This class defines the structure of the 'cc_blockcontents' table.
  4. *
  5. *
  6. *
  7. * This map class is used by Propel to do runtime db structure discovery.
  8. * For example, the createSelectSql() method checks the type of a given column used in an
  9. * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
  10. * (i.e. if it's a text column type).
  11. *
  12. * @package propel.generator.airtime.map
  13. */
  14. class CcBlockcontentsTableMap extends TableMap {
  15. /**
  16. * The (dot-path) name of this class
  17. */
  18. const CLASS_NAME = 'airtime.map.CcBlockcontentsTableMap';
  19. /**
  20. * Initialize the table attributes, columns and validators
  21. * Relations are not initialized by this method since they are lazy loaded
  22. *
  23. * @return void
  24. * @throws PropelException
  25. */
  26. public function initialize()
  27. {
  28. // attributes
  29. $this->setName('cc_blockcontents');
  30. $this->setPhpName('CcBlockcontents');
  31. $this->setClassname('CcBlockcontents');
  32. $this->setPackage('airtime');
  33. $this->setUseIdGenerator(true);
  34. $this->setPrimaryKeyMethodInfo('cc_blockcontents_id_seq');
  35. // columns
  36. $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
  37. $this->addForeignKey('BLOCK_ID', 'DbBlockId', 'INTEGER', 'cc_block', 'ID', false, null, null);
  38. $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null);
  39. $this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
  40. $this->addColumn('TRACKOFFSET', 'DbTrackOffset', 'REAL', true, null, 0);
  41. $this->addColumn('CLIPLENGTH', 'DbCliplength', 'VARCHAR', false, null, '00:00:00');
  42. $this->addColumn('CUEIN', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
  43. $this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
  44. $this->addColumn('FADEIN', 'DbFadein', 'TIME', false, null, '00:00:00');
  45. $this->addColumn('FADEOUT', 'DbFadeout', 'TIME', false, null, '00:00:00');
  46. // validators
  47. } // initialize()
  48. /**
  49. * Build the RelationMap objects for this table relationships
  50. */
  51. public function buildRelations()
  52. {
  53. $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
  54. $this->addRelation('CcBlock', 'CcBlock', RelationMap::MANY_TO_ONE, array('block_id' => 'id', ), 'CASCADE', null);
  55. } // buildRelations()
  56. /**
  57. *
  58. * Gets the list of behaviors registered for this table
  59. *
  60. * @return array Associative array (name => parameters) of behaviors
  61. */
  62. public function getBehaviors()
  63. {
  64. return array(
  65. 'aggregate_column_relation' => array('foreign_table' => 'cc_block', 'update_method' => 'updateDbLength', ),
  66. );
  67. } // getBehaviors()
  68. } // CcBlockcontentsTableMap