128], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'keyword' => '关键词', 'created_at' => 'created_at', 'updated_at' => 'updated_at', 'user_id' => '用户', 'count' => '次数', 'del' => '是否已删除', ]; } public function behaviors() { return [ [ 'class' => TimestampBehavior::className(), ], [ 'class' => BlameableBehavior::className(), 'createdByAttribute' => 'user_id', 'updatedByAttribute' => false, ], ]; } public function getUser() { return $this->hasOne(User::className(), ['id' => 'user_id']); } }