CcShowInstancesTableMap.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * This class defines the structure of the 'cc_show_instances' 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 CcShowInstancesTableMap extends TableMap {
  15. /**
  16. * The (dot-path) name of this class
  17. */
  18. const CLASS_NAME = 'airtime.map.CcShowInstancesTableMap';
  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_show_instances');
  30. $this->setPhpName('CcShowInstances');
  31. $this->setClassname('CcShowInstances');
  32. $this->setPackage('airtime');
  33. $this->setUseIdGenerator(true);
  34. $this->setPrimaryKeyMethodInfo('cc_show_instances_id_seq');
  35. // columns
  36. $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
  37. $this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null);
  38. $this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null);
  39. $this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
  40. $this->addColumn('RECORD', 'DbRecord', 'TINYINT', false, null, 0);
  41. $this->addColumn('REBROADCAST', 'DbRebroadcast', 'TINYINT', false, null, 0);
  42. $this->addForeignKey('INSTANCE_ID', 'DbOriginalShow', 'INTEGER', 'cc_show_instances', 'ID', false, null, null);
  43. $this->addForeignKey('FILE_ID', 'DbRecordedFile', 'INTEGER', 'cc_files', 'ID', false, null, null);
  44. $this->addColumn('TIME_FILLED', 'DbTimeFilled', 'VARCHAR', false, null, '00:00:00');
  45. $this->addColumn('CREATED', 'DbCreated', 'TIMESTAMP', true, null, null);
  46. $this->addColumn('LAST_SCHEDULED', 'DbLastScheduled', 'TIMESTAMP', false, null, null);
  47. $this->addColumn('MODIFIED_INSTANCE', 'DbModifiedInstance', 'BOOLEAN', true, null, false);
  48. // validators
  49. } // initialize()
  50. /**
  51. * Build the RelationMap objects for this table relationships
  52. */
  53. public function buildRelations()
  54. {
  55. $this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
  56. $this->addRelation('CcShowInstancesRelatedByDbOriginalShow', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null);
  57. $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
  58. $this->addRelation('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
  59. $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
  60. $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'SET NULL', null);
  61. } // buildRelations()
  62. } // CcShowInstancesTableMap