<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Attendance extends Model
{
    protected $fillable = ['employee_id','attendance_date','check_in','check_out','photo_path','checkout_photo_path','latitude','longitude','checkout_latitude','checkout_longitude','location_name','checkout_location_name','status','notes'];
    protected $casts = ['attendance_date' => 'date','check_in' => 'datetime','check_out' => 'datetime','latitude' => 'decimal:7','longitude' => 'decimal:7','checkout_latitude' => 'decimal:7','checkout_longitude' => 'decimal:7'];
    public function employee(): BelongsTo { return $this->belongsTo(Employee::class); }
}
