<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SpaceCheckIn extends Model
{
    use HasFactory;
    protected $guarded = [];
    public function checkedIn($user_id,$space_id)
    {
        return SpaceCheckIn::where(['user_id'=>$user_id,'space_id'=>$space_id])->count()>0?1:0;
    }
}
