CcAccessTableMap.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * This class defines the structure of the 'cc_access' 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 CcAccessTableMap extends TableMap {
  15. /**
  16. * The (dot-path) name of this class
  17. */
  18. const CLASS_NAME = 'airtime.map.CcAccessTableMap';
  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_access');
  30. $this->setPhpName('CcAccess');
  31. $this->setClassname('CcAccess');
  32. $this->setPackage('airtime');
  33. $this->setUseIdGenerator(true);
  34. $this->setPrimaryKeyMethodInfo('cc_access_id_seq');
  35. // columns
  36. $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
  37. $this->addColumn('GUNID', 'Gunid', 'CHAR', false, 32, null);
  38. $this->addColumn('TOKEN', 'Token', 'BIGINT', false, null, null);
  39. $this->addColumn('CHSUM', 'Chsum', 'CHAR', true, 32, '');
  40. $this->addColumn('EXT', 'Ext', 'VARCHAR', true, 128, '');
  41. $this->addColumn('TYPE', 'Type', 'VARCHAR', true, 20, '');
  42. $this->addColumn('PARENT', 'Parent', 'BIGINT', false, null, null);
  43. $this->addForeignKey('OWNER', 'Owner', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
  44. $this->addColumn('TS', 'Ts', 'TIMESTAMP', false, null, null);
  45. // validators
  46. } // initialize()
  47. /**
  48. * Build the RelationMap objects for this table relationships
  49. */
  50. public function buildRelations()
  51. {
  52. $this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), null, null);
  53. } // buildRelations()
  54. } // CcAccessTableMap