/** Constructor. */ public function __construct() { parent::__construct(); $this->_name = 'oauth_token'; $this->_key = 'token_id'; $this->_mainData = array('token_id' => array('type' => MIDAS_DATA), 'token' => array('type' => MIDAS_DATA), 'scopes' => array('type' => MIDAS_DATA), 'client_id' => array('type' => MIDAS_DATA), 'user_id' => array('type' => MIDAS_DATA), 'creation_date' => array('type' => MIDAS_DATA), 'expiration_date' => array('type' => MIDAS_DATA), 'type' => array('type' => MIDAS_DATA), 'user' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'User', 'parent_column' => 'user_id', 'child_column' => 'user_id'), 'client' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'Client', 'module' => $this->moduleName, 'parent_column' => 'client_id', 'child_column' => 'client_id')); $this->initialize(); // required }
/** Constructor. */ public function __construct() { parent::__construct(); $this->_name = 'oauth_client'; $this->_key = 'client_id'; $this->_mainData = array('client_id' => array('type' => MIDAS_DATA), 'name' => array('type' => MIDAS_DATA), 'secret' => array('type' => MIDAS_DATA), 'creation_date' => array('type' => MIDAS_DATA), 'owner_id' => array('type' => MIDAS_DATA), 'owner' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'User', 'parent_column' => 'user_id', 'child_column' => 'owner_id'), 'codes' => array('type' => MIDAS_ONE_TO_MANY, 'model' => 'Code', 'module' => 'oauth', 'parent_column' => 'client_id', 'child_column' => 'client_id'), 'tokens' => array('type' => MIDAS_ONE_TO_MANY, 'model' => 'Token', 'module' => 'oauth', 'parent_column' => 'client_id', 'child_column' => 'client_id')); $this->initialize(); // required }