<?php

namespace App\Models;

use App\Models\CompanyProfile;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class EzyPOS extends Model
{
    use HasFactory;

    protected $table = 'ezypos';

    protected $fillable = [
        'company_id',
        'app_id',
        'pin',
        'last_login',
        'last_modified',
        'registered_date',
        'expiry_date',
    ];

    protected $hidden = [
        'pin',
    ];

    public function company()
    {
        return $this->belongsTo(CompanyProfile::class, 'company_id', 'company_id');
    }
}
