示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPost()
 {
     return $this->hasOne(TblPost::className(), ['id' => 'post_id']);
 }
示例#2
0
文件: User.php 项目: Atsumoriso/Yii
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTblPosts()
 {
     return $this->hasMany(TblPost::className(), ['author_id' => 'id']);
 }