]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Foreign_subscription.php
buttle's local/plugins translation file fix
[quix0rs-gnu-social.git] / classes / Foreign_subscription.php
1 <?php
2 /**
3  * Table Definition for foreign_subscription
4  */
5 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
6
7 class Foreign_subscription extends Managed_DataObject
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'foreign_subscription';            // table name
13     public $service;                         // int(4)  primary_key not_null
14     public $subscriber;                      // int(4)  primary_key not_null
15     public $subscribed;                      // int(4)  primary_key not_null
16     public $created;                         // datetime()   not_null
17
18     /* the code above is auto generated do not remove the tag below */
19     ###END_AUTOCODE
20
21     public static function schemaDef()
22     {
23         return array(
24
25             'fields' => array(
26                 'service' => array('type' => 'int', 'not null' => true, 'description' => 'service where relationship happens'),
27                 'subscriber' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'subscriber on foreign service'),
28                 'subscribed' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'subscribed user'),
29                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
30             ),
31             'primary key' => array('service', 'subscriber', 'subscribed'),
32             'foreign keys' => array(
33                 'foreign_subscription_service_fkey' => array('foreign_service', array('service' => 'id')),
34                 'foreign_subscription_subscriber_fkey' => array('foreign_user', array('subscriber' => 'id', 'service' => 'service')),
35                 'foreign_subscription_subscribed_fkey' => array('foreign_user', array('subscribed' => 'id', 'service' => 'service')),
36             ),
37             'indexes' => array(
38                 'foreign_subscription_subscriber_idx' => array('service', 'subscriber'),
39                 'foreign_subscription_subscribed_idx' => array('service', 'subscribed'),
40             ),
41         );
42     }
43 }