'ID', 'user_id' => '用户', 'article_id' => '文章', 'created_at' => '收藏时间', ]; } public function behaviors() { return [ [ 'class' => TimestampBehavior::className(), 'updatedAtAttribute' => false ], ]; } public function getArticle() { return $this->hasOne(Article::className(), ['id' => 'article_id']); } }