public function getCheckInCount()
{
- return $this->hasMany(AdminCheckin::class, ['admin_id' => 'admin_id'])
- ->andWhere(['BETWEEN', 'time',
- date('Y-m-d H:i:s', strtotime($this->date_start . ' ' . $this->time_start)),
- date('Y-m-d H:i:s', strtotime($this->date_end . ' ' . $this->time_end))])
- ->count();
+ return $this->is_close ? 0 : 1;
+// return $this->hasMany(AdminCheckin::class, ['admin_id' => 'admin_id'])
+// ->andWhere(['BETWEEN', 'time',
+// date('Y-m-d H:i:s', strtotime($this->date_start . ' ' . $this->time_start)),
+// date('Y-m-d H:i:s', strtotime($this->date_end . ' ' . $this->time_end))])
+// ->count();
}
public function getAdmin()