50], ['money', 'compare', 'operator' => '>', 'compareValue' => 0] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'article_id' => 'Article ID', 'user_id' => 'User ID', 'money' => 'Money', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public function behaviors() { return [ TimestampBehavior::className(), [ 'class' => BlameableBehavior::className(), 'createdByAttribute' => 'user_id', 'updatedByAttribute' => false ] ]; } public function getArticle() { return $this->hasOne(Article::className(), ['id' => 'article_id']); } }