<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CompanySession extends Model
{
    protected $table = 'company_sessions';
    public $incrementing = false;
    protected $keyType   = 'string';
    public $timestamps   = false;

    protected $fillable = [
        'id','company_id','user_id','ip_address',
        'user_agent','payload','last_activity','logged_in_at'
    ];

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

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
