]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Remember_me.php
move core schema to class files
[quix0rs-gnu-social.git] / classes / Remember_me.php
1 <?php
2 /**
3  * Table Definition for remember_me
4  */
5 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
6
7 class Remember_me extends Managed_DataObject
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'remember_me';                     // table name
13     public $code;                            // varchar(32)  primary_key not_null
14     public $user_id;                         // int(4)   not_null
15     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
16
17     /* Static get */
18     function staticGet($k,$v=null)
19     {
20         return Memcached_DataObject::staticGet('Remember_me',$k,$v);
21     }
22
23     /* the code above is auto generated do not remove the tag below */
24     ###END_AUTOCODE
25
26     function sequenceKey()
27     {
28         return array(false, false);
29     }
30
31     public static function schemaDef()
32     {
33         return array(
34             'fields' => array(
35                 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'),
36                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who is logged in'),
37                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
38             ),
39             'primary key' => array('code'),
40             'foreign keys' => array(
41                 'remember_me_user_id_fkey' => array('user', array('user_id' => 'id')),
42             ),
43         );
44     }    
45 }