Unavailable_status_network.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * Data class for unavailable status networks
  4. *
  5. * PHP version 5
  6. *
  7. * @category Data
  8. * @package StatusNet
  9. * @author Evan Prodromou <evan@status.net>
  10. * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
  11. * @link http://status.net/
  12. *
  13. * StatusNet - the distributed open-source microblogging tool
  14. * Copyright (C) 2011, StatusNet, Inc.
  15. *
  16. * This program is free software: you can redistribute it and/or modify
  17. * it under the terms of the GNU Affero General Public License as published by
  18. * the Free Software Foundation, either version 3 of the License, or
  19. * (at your option) any later version.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU Affero General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU Affero General Public License
  27. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  28. */
  29. if (!defined('STATUSNET')) {
  30. exit(1);
  31. }
  32. /**
  33. * Keeps a list of unavailable status network names
  34. *
  35. * @category Data
  36. * @package StatusNet
  37. * @author Evan Prodromou <evan@status.net>
  38. * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
  39. * @link http://status.net/
  40. *
  41. * @see Managed_DataObject
  42. */
  43. class Unavailable_status_network extends Managed_DataObject
  44. {
  45. public $__table = 'unavailable_status_network'; // table name
  46. public $nickname; // varchar(64) UUID
  47. public $created; // datetime() not_null default_0000-00-00%2000%3A00%3A00
  48. /**
  49. * The One True Thingy that must be defined and declared.
  50. */
  51. public static function schemaDef()
  52. {
  53. return array(
  54. 'description' => 'An unavailable status network nickname',
  55. 'fields' => array(
  56. 'nickname' => array('type' => 'varchar',
  57. 'length' => 64,
  58. 'not null' => true, 'description' => 'nickname not to use'),
  59. 'created' => array('type' => 'datetime',
  60. 'not null' => true, 'default' => '0000-00-00 00:00:00'),
  61. ),
  62. 'primary key' => array('nickname'),
  63. );
  64. }
  65. }