3 * Table Definition for foreign_subscription
5 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
7 class Foreign_subscription extends Managed_DataObject
10 /* the code below is auto generated do not remove the above tag */
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
19 function staticGet($k,$v=null)
20 { return Memcached_DataObject::staticGet('Foreign_subscription',$k,$v); }
22 /* the code above is auto generated do not remove the tag below */
25 public static function schemaDef()
30 'service' => array('type' => 'int', 'not null' => true, 'description' => 'service where relationship happens'),
31 'subscriber' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'subscriber on foreign service'),
32 'subscribed' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'subscribed user'),
33 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
35 'primary key' => array('service', 'subscriber', 'subscribed'),
36 'foreign keys' => array(
37 'foreign_subscription_service_fkey' => array('foreign_service', array('service' => 'id')),
38 'foreign_subscription_subscriber_fkey' => array('foreign_user', array('subscriber' => 'id', 'service' => 'service')),
39 'foreign_subscription_subscribed_fkey' => array('foreign_user', array('subscribed' => 'id', 'service' => 'service')),
42 'foreign_subscription_subscriber_idx' => array('service', 'subscriber'),
43 'foreign_subscription_subscribed_idx' => array('service', 'subscribed'),