<?php 
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Clockins extends Model
{
    use HasFactory;

    protected $fillable = [
        "org_id",
        "user_id",
        "clockin_time",
        "clockout_time",
        "late_period",
        "overtime_period",
        "is_clocked_in",
        "is_clocked_out",
        "clockin_status",
        "clockout_status",
        "ip_address",
        "device",
        "timestamps",
        "current_status"
    ];

        //Define Child Relationships
        public function organisation()
        {
            return $this->belongsTo(Organisation::class, "org_id");
        }
        public function user()
        {
            return $this->belongsTo(User::class, "user_id");
        }
}