CcSessTableMap.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * This class defines the structure of the 'cc_sess' 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 CcSessTableMap extends TableMap {
  15. /**
  16. * The (dot-path) name of this class
  17. */
  18. const CLASS_NAME = 'airtime.map.CcSessTableMap';
  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_sess');
  30. $this->setPhpName('CcSess');
  31. $this->setClassname('CcSess');
  32. $this->setPackage('airtime');
  33. $this->setUseIdGenerator(false);
  34. // columns
  35. $this->addPrimaryKey('SESSID', 'Sessid', 'CHAR', true, 32, null);
  36. $this->addForeignKey('USERID', 'Userid', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
  37. $this->addColumn('LOGIN', 'Login', 'VARCHAR', false, 255, null);
  38. $this->addColumn('TS', 'Ts', 'TIMESTAMP', false, null, null);
  39. // validators
  40. } // initialize()
  41. /**
  42. * Build the RelationMap objects for this table relationships
  43. */
  44. public function buildRelations()
  45. {
  46. $this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('userid' => 'id', ), 'CASCADE', null);
  47. } // buildRelations()
  48. } // CcSessTableMap