Remember_me.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // This file is part of GNU social - https://www.gnu.org/software/social
  3. //
  4. // GNU social is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Affero General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // GNU social is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU Affero General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Affero General Public License
  15. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
  16. /**
  17. * Table Definition for remember_me
  18. */
  19. defined('GNUSOCIAL') || die();
  20. class Remember_me extends Managed_DataObject
  21. {
  22. ###START_AUTOCODE
  23. /* the code below is auto generated do not remove the above tag */
  24. public $__table = 'remember_me'; // table name
  25. public $code; // varchar(32) primary_key not_null
  26. public $user_id; // int(4) not_null
  27. public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
  28. /* the code above is auto generated do not remove the tag below */
  29. ###END_AUTOCODE
  30. public static function schemaDef()
  31. {
  32. return array(
  33. 'fields' => array(
  34. 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'),
  35. 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who is logged in'),
  36. 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
  37. ),
  38. 'primary key' => array('code'),
  39. 'foreign keys' => array(
  40. 'remember_me_user_id_fkey' => array('user', array('user_id' => 'id')),
  41. ),
  42. 'indexes' => array(
  43. 'remember_me_user_id_idx' => array('user_id'),
  44. ),
  45. );
  46. }
  47. }