<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class EmployeeAttendance
 * 
 * @property int $id
 * @property int $employee_id
 * @property Carbon $attended_date
 * @property Carbon $attended_time
 * @property Carbon|null $out_time
 * @property string $status
 * 
 * @property Employee $employee
 *
 * @package App\Models
 */
class EmployeeAttendance extends Model
{
	protected $table = 'employee_attendance';
	public $timestamps = false;

	protected $casts = [
		'employee_id' => 'int',
		'attended_date' => 'datetime',
		'attended_time' => 'datetime',
		'out_time' => 'datetime'
	];

	protected $fillable = [
		'employee_id',
		'attended_date',
		'attended_time',
		'out_time',
		'status'
	];

	public function employee()
	{
		return $this->belongsTo(Employee::class);
	}
}
