CcSectioncontentsTableMap.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * This class defines the structure of the 'cc_sectioncontents' 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 CcSectioncontentsTableMap extends TableMap {
  15. /**
  16. * The (dot-path) name of this class
  17. */
  18. const CLASS_NAME = 'airtime.map.CcSectioncontentsTableMap';
  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_sectioncontents');
  30. $this->setPhpName('CcSectioncontents');
  31. $this->setClassname('CcSectioncontents');
  32. $this->setPackage('airtime');
  33. $this->setUseIdGenerator(true);
  34. $this->setPrimaryKeyMethodInfo('cc_sectioncontents_id_seq');
  35. // columns
  36. $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
  37. $this->addForeignKey('SECTION_ID', 'DbSectionId', 'INTEGER', 'cc_section', '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('CLIPLENGTH', 'DbCliplength', 'VARCHAR', false, null, '00:00:00');
  41. $this->addColumn('CUEIN', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
  42. $this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
  43. $this->addColumn('FADEIN', 'DbFadein', 'TIME', false, null, '00:00:00');
  44. $this->addColumn('FADEOUT', 'DbFadeout', 'TIME', false, null, '00:00:00');
  45. // validators
  46. } // initialize()
  47. /**
  48. * Build the RelationMap objects for this table relationships
  49. */
  50. public function buildRelations()
  51. {
  52. $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
  53. $this->addRelation('CcSection', 'CcSection', RelationMap::MANY_TO_ONE, array('section_id' => 'id', ), 'CASCADE', null);
  54. } // buildRelations()
  55. /**
  56. *
  57. * Gets the list of behaviors registered for this table
  58. *
  59. * @return array Associative array (name => parameters) of behaviors
  60. */
  61. public function getBehaviors()
  62. {
  63. return array(
  64. 'aggregate_column_relation' => array('foreign_table' => 'cc_section', 'update_method' => 'updateDbLength', ),
  65. );
  66. } // getBehaviors()
  67. } // CcSectioncontentsTableMap