<?php

namespace common\models\query;

use common\enums\StatusEnum;

/**
 * This is the ActiveQuery class for [[\common\models\TeamLike]].
 *
 * @see \common\models\TeamLike
 */
class FootprintQuery extends \yii\db\ActiveQuery
{
    public function active()
    {
        return $this->andWhere(['status' => StatusEnum::STATUS_ON]);
    }


    /**
     * @return $this
     */
    public function my()
    {
        return $this->andWhere(['user_id' => \Yii::$app->user->id]);
    }

    /**
     * @inheritdoc
     * @return \common\models\ClockLike[]|array
     */
    public function all($db = null)
    {
        return parent::all($db);
    }

    /**
     * @inheritdoc
     * @return \common\models\ClockLike|array|null
     */
    public function one($db = null)
    {
        return parent::one($db);
    }
}
