Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
685 B
PHP
32 lines
685 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class OfflineCheckIn extends Model
|
|
{
|
|
protected $table = 'frontdesk_offline_checkins';
|
|
|
|
protected $fillable = ['device_id', 'client_id', 'payload', 'synced_at', 'visit_id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'payload' => 'array',
|
|
'synced_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function device(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Device::class, 'device_id');
|
|
}
|
|
|
|
public function visit(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Visit::class, 'visit_id');
|
|
}
|
|
}
|