Foreign_service.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Table Definition for foreign_service
  4. */
  5. require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
  6. class Foreign_service extends Managed_DataObject
  7. {
  8. ###START_AUTOCODE
  9. /* the code below is auto generated do not remove the above tag */
  10. public $__table = 'foreign_service'; // table name
  11. public $id; // int(4) primary_key not_null
  12. public $name; // varchar(32) unique_key not_null
  13. public $description; // varchar(191) not 255 because utf8mb4 takes more space
  14. public $created; // datetime() not_null
  15. public $modified; // timestamp() 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. 'id' => array('type' => 'int', 'not null' => true, 'description' => 'numeric key for service'),
  23. 'name' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'name of the service'),
  24. 'description' => array('type' => 'varchar', 'length' => 191, 'description' => 'description'),
  25. 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
  26. 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
  27. ),
  28. 'primary key' => array('id'),
  29. 'unique keys' => array(
  30. 'foreign_service_name_key' => array('name'),
  31. ),
  32. );
  33. }
  34. }