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
18 /* the code above is auto generated do not remove the tag below */
21 public static function schemaDef()
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'),
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')),
38 'foreign_subscription_subscriber_idx' => array('service', 'subscriber'),
39 'foreign_subscription_subscribed_idx' => array('service', 'subscribed'),