public function getShifts($reset = false) { if ($reset || !isset($this->_shifts)) { $this->_shifts = $this->hasMany(Shift::className(), ['team_id' => 'id']); } return $this->_shifts; }
public function getShift() { return $this->hasOne(Shift::className(), ['id' => 'shift_id']); }