39 lines
800 B
PHP
39 lines
800 B
PHP
<?php
|
|
|
|
namespace Modules\HRM\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class AttendanceLog extends Model
|
|
{
|
|
protected $fillable = [
|
|
'restaurant_id',
|
|
'attendance_id',
|
|
'employee_id',
|
|
'restaurant_id',
|
|
'type',
|
|
'punch_time',
|
|
'device_id',
|
|
'latitude',
|
|
'longitude',
|
|
'ip_address',
|
|
];
|
|
|
|
protected $dates = ['punch_time', 'created_at', 'updated_at'];
|
|
|
|
public const TABLE_NAME = 'attendance_logs';
|
|
|
|
protected $table = self::TABLE_NAME;
|
|
|
|
public function attendance(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Attendance::class);
|
|
}
|
|
|
|
public function employee(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Employee::class);
|
|
}
|
|
}
|