コード例 #1
0
ファイル: WxbizAgent.php プロジェクト: 171906502/wetM2.0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRole()
 {
     return $this->hasOne(WxbizRole::className(), ['id' => 'role_id']);
 }
コード例 #2
0
ファイル: WxbizCorp.php プロジェクト: 171906502/wetM2.0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRoles()
 {
     return $this->hasMany(WxbizRole::className(), ['corp_id' => 'id']);
 }