Notice_source.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Table Definition for notice_source
  4. */
  5. require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
  6. class Notice_source extends Managed_DataObject
  7. {
  8. ###START_AUTOCODE
  9. /* the code below is auto generated do not remove the above tag */
  10. public $__table = 'notice_source'; // table name
  11. public $code; // varchar(32) primary_key not_null
  12. public $name; // varchar(191) not_null not 255 because utf8mb4 takes more space
  13. public $url; // varchar(191) not_null not 255 because utf8mb4 takes more space
  14. public $created; // datetime() not_null default_0000-00-00%2000%3A00%3A00
  15. public $modified; // datetime() not_null default_CURRENT_TIMESTAMP
  16. /* the code above is auto generated do not remove the tag below */
  17. ###END_AUTOCODE
  18. public static function schemaDef()
  19. {
  20. return array(
  21. 'fields' => array(
  22. 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'source code'),
  23. 'name' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'name of the source'),
  24. 'url' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'url to link to'),
  25. 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'date this record was created'),
  26. 'created' => array('type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'),
  27. 'modified' => array('type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'),
  28. ),
  29. 'primary key' => array('code'),
  30. );
  31. }
  32. }