<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class SyncQueue extends BasePosModel
{
    protected $table = 'sync_queue';

    protected function casts(): array
    {
        return [
            'payload' => 'array',
            'synced_at' => 'datetime',
            'attempts' => 'integer',
        ];
    }

    public function company(): BelongsTo
    {
        return $this->belongsTo(Company::class);
    }

    public function branch(): BelongsTo
    {
        return $this->belongsTo(Branch::class);
    }
}
